I have a full installation of Visual Studio 2010 with .Net framework 4. I want create my first web service. but not exist web service template.
In visual studio 2010 I go to File -> New Web Site menu , but in the New Web Site dialog box not exist ASP.NET Web Service template.
How to create a Web Service?
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Use File->New Project->WCF Service Application.
“ASP.NET Web Services” (aka ASMX) is a legacy technology. It exists only to support existing ASMX services. Do not use it for new development.
create ASP.net Empty Web Site and add asmx file. that’s it.
Or You can Target the .Net Framework to 3.5 when you create the project and web service template available for .net 3.5, create the project and re target it to 4.0 or 4.5
But You better move to Windows Communication Foundation (WCF)
Go to File –> New –>Asp.Net Empty Web application.
on that Right click –> Add New item – >webservice template
File > New Project > Visual C# > Web Service Application
You can create multiple projects under one solution..
create a web service,build and run it.
Then create another webapplication under the same solution file.