Is it possible to use async/await in webmethod asmx service [duplicate]
Asked Answered
C

1

9

I am trying to figured it out, but have no success for now. Is it possible to use async/await in webmethod asmx service ? What I found till now is that async/await can be used only in WCF service method (rest or whatever).

Cassatt answered 26/6, 2012 at 16:21 Comment(4)
WCF was released in 2006 as a recommended replacement for asmx. Asmx was officially declared a "legacy technology" in 2009. If you're planning to change the code anyway to make it async, why not change it to a newer platform?Kauri
In general, you should not expect ASMX to keep up with modern technology. It is legacy software, kept around for backwards compatibility. Consider the following question: why should Microsoft has spent money testing async/await on ASMX services?Fibrinolysin
Stephen, John, thank you for your comments. I guess I should go in direction to migrate my existing asmx service to wcf.Cassatt
John, you marked the question as duplicated, but the question you marked as source is asked more than one year after this question.Cassatt
M
3

This is a bad idea. You're basically trying to use a modern language feature with a legacy technology - when .asmx was introduced the notion of asynchronous services wasn't really established.

An answer may lie here though:

Is there some way to handle async/await behind an ASMX service?

I'd say stick to WCF or WebAPI.

Millrun answered 14/5, 2014 at 23:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.