If you closely observe that ,there is no separate web service template in .Framework 2010 as you see in 2008 while adding a project or web site it might be because of WCF.
So let us start using a different way to add a web service using a template
- "Start" - "All Programs" - "Microsoft Visual Studio 2010"
- "File" - "New Project" - "C#" - "Empty Web Application" (to avoid adding a master page)
- Provide the web site a name such as "agetodays" or another as you wish and specify the location
- Then right-click on Solution Explorer - "Add New Item" - you see the web service templates
Select Web Service Template and click on add button. then after that the Solution Explorer look like as follows.
Then open the Webservice.cs class and write the following method followed by [webMethod] attribute as in.
[WebMethod]
public string HelloWorld() {
return "Hello World";
}