Should I be using Web API vs Web Methods?
Asked Answered
P

1

10

I'm trying to understand web api and some news about web methods. I've heard that we should stop using web methods from a few sources. Additionally, is Web API the successor if web methods should no longer be used?

Pertinacious answered 27/2, 2014 at 2:48 Comment(1)
If your going to downgrade a question, you should at least provide a comment why.Pertinacious
D
12

Web methods are part of the ASMX technology. ASMX is a legacy technology, and should not be used for new development. WCF or ASP.NET Web API should be used for all new development of web service clients and servers. One hint: Microsoft has retired the ASMX Forum on MSDN.

Whether you use WCF or the ASP.NET Web API will depend on your requirements. WCF is more similar to web methods, but far richer. ASP.NET Web API can provide you with all of the features of the HTTP protocol, if your API requires them.

But in any case, stop using Web Methods in new development. Also, I suggest you ask yourself why you didn't know that ASMX had been replaced by WCF about eight years ago. What else have you been missing out on in the past eight years? What else could have taken your business to places your competitors have already gone?

Drear answered 27/2, 2014 at 2:53 Comment(2)
plus 1 This is not just an answer but a lesson for lifeDecigram
@Tim the need to maintain legacy applications doesn't imply you can't stay up to date.Drear

© 2022 - 2024 — McMap. All rights reserved.