Should I be using Web API vs Web Methods?

前端 未结 1 2150
别跟我提以往
别跟我提以往 2021-02-20 13:00

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

相关标签:
1条回答
  • 2021-02-20 13:53

    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?

    0 讨论(0)
提交回复
热议问题