IIS Express配置使通过IP访问

来源:互联网 发布:软件开发项目进度 编辑:程序博客网 时间:2024/05/17 00:51

打开 [我的文档]\IISExpress\config\applicationhost.config

找到下面的代码块

在 <bindings></bindings>中仿照

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

把localhost改为你的ip地址,改完后效果如下:

<site name="Web" id="13">           <application path="/" applicationPool="Clr4IntegratedAppPool">                <virtualDirectory path="/" physicalPath="E:\ASP.NET\超凡装饰\cfzs\Web" />           </application>           <bindings>                <binding protocol="http" bindingInformation="*:51898:localhost" />                <binding protocol="http" bindingInformation="*:51898:192.168.0.101" />           </bindings>       </site>