iisexpress局域网内调试网站

1、找到IISExpress目录

IISExpressconfigapplicationhost.config(注:如果使用vs2015则更改解决方案目录下的.vs文件夹中的该文件

<site name="RMS.Web" id="18">
   <application path="/" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="C:workgroupWeb" />
   </application>
   <bindings>
        <binding protocol="http" bindingInformation="*:61730:localhost" />
   </bindings>
</site>

2、加上下面配置文件中黄色标记的代码

<site name="RMS.Web" id="18">
  <application path="/" applicationPool="Clr4IntegratedAppPool">
       <virtualDirectory path="/" physicalPath="C:workgroupRMS.Web" />
  </application>
  <bindings>
       <binding protocol="http" bindingInformation="*:61730:localhost" />
       <binding protocol="http" bindingInformation="*:61730:*" />
  </bindings>
</site>    

3、用管理员打开VS,运行程序

4、在局域网内的另一台机器上,打开浏览器,输入ip地址加端口号,从上面配置文件中可以看到程序端口号为:61730,现在你可以正常访问iisexpress中的网站了

原文地址:https://www.cnblogs.com/vitas/p/5408640.html