Run Web Service using IIS Express without Visual Studio

橙三吉。 提交于 2019-12-08 02:56:26

问题


I have created asmx web service in PC1. Now I have coped this project to some other PC2. I have installed only IIS Express and .NET Framework.

I want to run web service in PC2 using IIS Express. Is it possible or not? Thanks!!


回答1:


Under the IIS Express folder in the C:\Program (x86) folder there's the appcmd.exe. First you need to add a virtual directory with the follwoing command:

appcmd add vdir /app.name:<site_name>/ /path:/<virtual_directory> /physicalPath:<physical_location>

If there is no site you can add one by yourself:

appcmd add site /name:SITENAME /id:2 /physicalPath:C:\PHYSICAL_PATH /bindings:http/*:8080

If you want to install the Service on the Default Web Site (if there is one) you can use the following:

vdir /app.name:"Default Web Site"/ /path:/service /physicalPath:C:\PHYSICAL_PATH



回答2:


Yes possible.

Steps for check:

  1. Whether that system is connected with LAN.
  2. You have to Set the IP address for PC2 in Edit Bindings(IIS)


来源:https://stackoverflow.com/questions/28471607/run-web-service-using-iis-express-without-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!