I have created a web service using C# and I have installed IIS Server 6.0. When I am running web service directly in project its working well. Now I want to deploy this service on my system's IIS Server so that my LAN partners can use it. How should I do that? And I want to change default port number of IIS too, how can I do that?
Asked
Active
Viewed 1.4k times
0
-
http://stackoverflow.com/questions/5818983/how-to-publish-a-web-service-from-visual-studio-into-iis check out this link – Thousand Sep 29 '12 at 12:29
-
what did you end up going with? – bryanmac Sep 30 '12 at 00:53
1 Answers
0
To run your web service under IIS
, setting up a virtual directory is pretty straightforward.
If you're looking to test publish a build, the web deployment project is the best option, you can do it from the command line and in VS.Net, it enables a "Publish" right-click
option.
Your web service endpoint is your .asmx
file (no .cs
file required in your deployment), and the DLL
in the bin folder contains the code that you wrote for your webservice.
SOAP, WSDL, Namespace
are all handled by IIS and ASP.NET.
In simple words:
- create a project of type
"ASP.NET Web service"
. - Select
"HTTP"
from location dropdownlist (indicates that the file should be placed on a web server) - After Develop your web service, Add web references, select
"browse UDDI Servers on the local network"
option if you want to share the web service among different computer. Enter the source.asmx
file URL and click"Go"
. - Select
"Add References"
to add your reference name for web service, by default is"localhost"
, you can give it a name. - Declare a reference for your web service in your .aspx file.
- You can try run your application in other PC.

Vishal Suthar
- 17,013
- 3
- 59
- 105