1 Open VS2010, menu file-New project
2 Select "ASP." To name the project you want.
3 Right click Project, add New item
Select the Web service. The name of the service is then named, such as Mywebsevice.
4 in the Asmx file, continue to add your own WebService method, which also changes the namespace to a name that is easy to remember.
5 After the method has been written, right-click the project, Publish.
6 Select "File System" to publish, select the Post folder address, click "Publish";
7 in the published folder, as in the next few files.
8 Open IIS, set up a Web site, right click on the default website, new virtual directory,
Choose the name of the website, such as MyWebService, the address of the folder you just published, and the IP and port of the publication, you need to set the default document and file permissions, version, and so on.
For details, see the 2011-04-15 C # Writing methods and procedures for database Web pages.
9 after the successful release, it can be in IE address,
Input Http://localhost/myWebService/myWebservice1.asmx
To see if your webservice is normal,
At the end of the address input? WSDL to view, related methods, and their parameters, etc.
Input http://localhost/myWebService/myWebservice1.asmx?wsdl
10 Click on the method name in the page, enter the parameters, press the call button, and test whether it is correct.
If you encounter problems, Baidu
Create WebService publish, test with VS2010