Use c # to build webservice

Find a lot online. Success, share with you my experience. (I didn't encounter so many problems)
I used vs2010 Professional Edition.
The computer should start function, otherwise it will make mistakes.
Insert picture description here
Look patiently.


Next, use vs. to
Insert picture description herefirst create a web project. There is no empty web application, because the subsequent lack of configuration errors can be avoided.

After adding new items, after adding Insert picture description here, the code will automatically generate a hello world, and then right-click on your project name, as follows
Insert picture description here
Click on the release, select the file system, select a directory, the directory to remember.
Insert picture description here


Next open ISS,
Insert picture description hereInsert picture description hereclick on the default document, is to open this address, the default interface,
Insert picture description hereadd our new asmx file,
Insert picture description herenow you can click to browse the website, it can be displayed normally.


We next want to call the webService that we just created.
Still open VS and create Insert picture description hereInsert picture description herethis interface, indicating that it is ok .
Insert picture description here
Insert picture description hereThe output is as followsInsert picture description here

Published 161 original articles · Like 68 · Visitors 20,000+

Guess you like

Origin blog.csdn.net/qq_43179428/article/details/105184047