加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net-mvc – IIS Express启用外部请求 – 503

发布时间:2020-12-16 03:43:37 所属栏目:asp.Net 来源:网络整理
导读:我试图让IIS Express工作,以便外部用户可以查看我的MVC ASP.NET开发网站.我按照这个 SO answer的说明,但现在使用我的外部IP地址访问网站时出现503错误,localhost仍然可以正常工作. 我的配置文件似乎没问题 site name="ManagerUI" id="5" application path="/
我试图让IIS Express工作,以便外部用户可以查看我的MVC ASP.NET开发网站.我按照这个 SO answer的说明,但现在使用我的外部IP地址访问网站时出现503错误,localhost仍然可以正常工作.

我的配置文件似乎没问题

<site name="ManagerUI" id="5">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="D:Application DevelopmentManagerMAIN-BranchManagerUIManagerUI" />
    </application>
    <bindings>
        <binding protocol="http" bindingInformation="*:1904:" />
    </bindings>
</site>

我发现以下SO answer解决了这个问题,但它只允许它在外部地址而不是我的所有IP地址(localhost,外部地址等)上工作

<binding protocol="http" bindingInformation=":1904:your-machine-name" />

解决方法

我设法解决了它,我的错误是认为你只能有一个绑定集,然后我为我想要服务的每个外部地址设置绑定它现在都可以工作

<bindings>
    <binding protocol="http" bindingInformation=":1904:" />
    <binding protocol="http" bindingInformation=":1904:machineName" />
    <binding protocol="http" bindingInformation=":1904:10.1.10.123" />
</bindings>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读