ASP.NET Web Service
Step 1: In ASP.NET Web Application Open Solution Explorer and
right click on your project name and
navigate to Add>New Item and
select web service from the dialog.
Step 2: Now open the web service which you recently added in your project then you will see a window which is as follows:
As you can see there is a method declared as HelloWorld() which will contains the code of your service which you want to do with the web service.
Step 3: To run the service navigate to WebService2.asmx in
your solution explorer and right click on it and select View in browser option.
The corresponding service will be opened in the browser as
follows: