Here's the step:
1. Open VS Studio.
2. create new empty Web Application.
3. write click your project name > add > new item
4. Search box on the right then enter "web service".
5. select web service > enter web service name the hit ok.
It will look like this:
[WebMethod]
public string HelloWorld(String sendMeToDb)
{
//this could be send to db or anything.
//like
Insert sendMeToDb what ever you want;
return sendMeToDb;
}
-Clean > build > Publish.
-ojb project folder\Release\Package\PackageTmp.
-Copy Content
6.(Paste) Deploy Web Service in your local or in other server PC in (IIS)
7. Set up IIS.
8. [Register][1] asp.net in IIS.
9. Create new Website.
10. Copy and paste your project to Newly created website.
11.enable Directory Browsing.
12. Set up application pool framework.
13. right click .asmx file > Browse.
If Web Service running normally then.
14. copy the web service url.
15. Create new empty Web Application Project.
16. Right Click References > Add Service References.
17. Address dropdown paste the url copied from .asmx > Click Go
18.Input namespace then ok.
Project Form Load Look like this.
protected void Page_Load(object sender, EventArgs e)
{
ServiceReference1.WebService1SoapClient cli = new ServiceReference1.WebService1SoapClient();
String str= cli.HelloWorld("Send Me To DB");
}
Run the project.