[转]IISExpress配置使其能通过IP访问方法

转自http://www.cnblogs.com/liujh/p/4315927.html

环境说明:

本机IP:192.168.2.100;Web端口:11843

 

步骤一

打开[我的文档]IISExpressconfigapplicationhost.config,找到下面的代码块

<site name="Web" id="1">

        <application path="/" applicationPool="Clr4IntegratedAppPool">

                    <virtualDirectory path="/" physicalPath="E:Web" />

        </application>

        <bindings>

                    <binding protocol="http" bindingInformation="*:11843:localhost" />

         </bindings>

</site>

 

步骤二

方法一、在 <bindings></bindings>

把<binding protocol="http" bindingInformation="*:11843:localhost" />

改成自己的IP地址

<binding protocol="http" bindingInformation="*: 11843:192.168.2.100" />

 方法二、也可以增加<binging>

 <binding protocol="http" bindingInformation="*: 11843:127.0.0.1" />

 <binding protocol="http" bindingInformation="*: 11843:192.168.2.173" />

 

步骤三、如果还是不能通过IP访问,重起电脑就可以了。

原文地址:https://www.cnblogs.com/mingjing/p/4962542.html