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

环境说明:

本机IP:192.168.2.100;Web端口:11843

 

步骤一

打开[我的文档]\IISExpress\config\applicationhost.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访问,重起电脑就可以了。

posted @ 2015-03-05 15:20  liujunhua  阅读(2069)  评论(0编辑  收藏  举报