我试图让 IIS Express 工作,以便外部用户可以查看我的 MVC ASP.NET 开发网站。我按照此 SO answer 的说明进行操作但是现在使用我的外部 IP 地址访问网站时出现 503 错误,localhost 仍然可以正常工作。
我的配置文件似乎没问题
<site name="ManagerUI" id="5">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="D:\Application Development\Manager\MAIN-Branch\ManagerUI\ManagerUI" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:1904:" />
</bindings>
</site>
我发现了以下 SO answer这解决了这个问题,但它只允许它在外部地址而不是我的所有 IP 地址(本地主机、外部地址等)上工作
<binding protocol="http" bindingInformation=":1904:your-machine-name" />
最佳答案
我设法解决了它,我的错误是认为你只能有一个绑定(bind)集,然后我为我希望服务的每个外部地址设置绑定(bind),现在一切正常
<bindings>
<binding protocol="http" bindingInformation=":1904:" />
<binding protocol="http" bindingInformation=":1904:machineName" />
<binding protocol="http" bindingInformation=":1904:10.1.10.123" />
</bindings>
关于asp.net-mvc - IIS Express 启用外部请求 - 503,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17048252/