How to host a webservice Locally for debugging

Following are the steps followed to create your local webservice for debugging in dotnet. (WCF has replaced webservices in dotnet but still people are using webservices. This is for those legacy applications.



1. Build your webservice.
2. Check IIS is installed in your system by typing inetmgr in run.
If installed go ahead with the step 3 else install it from windows component in windows installation.
3. If you are using IIS 7 , right click on default website and click Add Application.
4. Give alias and physical path of the webservice application and click ok .
5. Once virtual directory is created, right c
lick on virtual directory and click on ManageApplication -----> Advanced Settings.
6. Change ApplicationPool to framework you are using.
7. Stop and start the webservice.
8. Now run .asmx file in browser. If still it is not running run this command aspnet_regiis.exe -i in dotnet command prompt.
9. For https enabling, click on default website, now on right hand side we will find Bindings under edit sites heading. Click on Bindings.



10. Add if https is not there. In above window, choose type as https and give ssl certificate and port no.
Now run the asmx file and give the url to client application you want to connect.


No comments:

Post a Comment

Pages