开发者_StackOverflow中文版Possible Duplicate:
VS 2010 Web Service project template missing?
I'm wondering why Asp.Net Web Service Application is missing in Visual Studio 2010. If it's updated to something new in Visual Studio 2010 what is it? If it's drop then how can I accomplish that task?
ASP.NET Web Service Application project template is not available for .Net framework 4.0, however, available for .Net Framework 3.5.
If you're building your application on .net framework 4.0, You can use WCF Service Application as ASMX in legacy. Please note that you'd need to enable AspNetCompatibilityMode to access HttpContext objects.
If you still want to use ASMX, choose ASP.NET Empty Web application and then you can add ASMX files to the project.
To create a ASP.NET Web Service Application in Visual Studio 2010 using the .NET Framework 4.0, first create a new project targeting the .NET Framework 3.5 (as the ASP.NET Web Service Application template is available for this version). Then right-click the project and re-target it to use the .NET Framework 4.0. Build, debug, done!
I too had the same problem when publishing web services from Navision. For that I created the project based on the .Net framework 3.5 (as the ASP.NET Web Service Application template is available for this version) in Visual Studio 2010 and it works fine for me.
I hit the same problem. It looks like .svc files are no longer necessary as of WCF 4.0, as Configuration-Based Activation will take care of this for you.
精彩评论