开发者

Usage of web service in ASP.NET web application

开发者 https://www.devze.com 2023-02-09 23:07 出处:网络
To some this could be stupid question. But here\'s the deal. I have asp.net web application and I use jquery to call functions inside *.aspx.cs files that have [WebMethod] attri开发者_如何学Pythonbute

To some this could be stupid question. But here's the deal. I have asp.net web application and I use jquery to call functions inside *.aspx.cs files that have [WebMethod] attri开发者_如何学Pythonbute attached to them. I had no clue that [WebMethod] is mainly using in web services. I never have worked with web services and I saw I can add .asmx file to my project. So from application architecture point of view where should I use and how can I use .asmx files, and if is it mistake to have [WebMethod] attribute inside *aspx.cs files. Thanks :D:D


Unless you're stuck using .NET 2.0, you shouldn't do either one. .asmx files are now considered by Microsoft to be a "legacy technology". All new web service development should use WCF. See https://stackoverflow.com/tags/wcf/info.


you are rushing for a solution. it not that simple, read articles returned by a search term such as "asp.net web service" or "wcf web services"

and decide how you want to proceed

it will take some time to understand, say one to two weeks..

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号