简体   繁体   中英

ASP.NET Web Service Application in .net 4

I was going through the MSDN walkthrough on using client application services. http://msdn.microsoft.com/en-us/library/bb546195.aspx

This is for .net 3.5..but i need to do it in .net 4. The thing is that it doesn't have any ASP.NET Web Service Applications listed. Has it introduced any replacement for that? Or is there any workaround?

Regards.

One of the way is to select target platform as .NET 3.5 in the drop-down at the top of New Project dialog - this will allow you to select "ASP.NET Web Service Application" project template. Once you select the template, you may change the target platform to .NET 4 using project properties.

I believe that the main reason for this template not being available in .NET 4 view is that this project uses ASP.NET web services (asmx files). Microsoft has declared this to be an obsolete technology and recommends to use WCF services instead.

You can expose ASP.NET application services (authentication, role etc used the sample sited by you) as WCF services. See section titled "Using application services as WCF services" in this link . So I will recommend you to choose ASP.NET Web Application project and then expose ASP.NET services as WCF services.

Instead web services use WCF , it has more features than asp.net Web Services

http://msdn.microsoft.com/en-us/library/ms731082.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM