【问题标题】:Change https to different port IIS Express applicationhost.config将 https 更改为不同的端口 IIS Express applicationhost.config
【发布时间】:2014-11-05 20:52:39
【问题描述】:

我在我的一个 sln 中创建了两个网站。由于两个网站都使用了 https 端口 44300,所以第二个网站的启动失败并出现 IISExpress 错误。

如果我在 applicationhost.config 中更改其中一个站点的 HTTPS 端口,它只会恢复为 44300。我删除了 https 绑定条目,它们只是被添加回来。

      <site name="prj(1)" id="130">
                <application path="/" applicationPool="Clr4IntegratedAppPool">
                    <virtualDirectory path="/" physicalPath="PATH" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:53884:localhost" />
                    <binding protocol="https" bindingInformation="*:44300:localhost" />
                </bindings>
            </site>
       <site name="prj2" id="102">
                <application path="/" applicationPool="Clr4IntegratedAppPool">
                    <virtualDirectory path="/" physicalPath="PATH" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:54777:localhost" />
                    <binding protocol="https" bindingInformation="*:44300:localhost" />
                </bindings>
            </site>

【问题讨论】:

    标签: asp.net-mvc iis-7 iis-7.5 iis-express


    【解决方案1】:

    我在这个帖子中找到了答案: IIS Express defaulting to port 44300 for https when enabling SSL

    绑定:

     <binding protocol="https" bindingInformation="*:44300:localhost" />
    

    无论您尝试删除多少次,迟早都会将其添加到 IIS Express applicationhost.config。

    不过,在我的链接中,提到“端口 44300 是连续的:00 表示它是您配置为启用 SSL 的第一个应用程序;01 将是第二个应用程序,依此类推。”

    所以我只是将我的绑定更改为 F5 多个网站,同时使用 IIS Express 来:

    网站1:

    网站2:

    <binding protocol="https" bindingInformation="*:44301:localhost" />
    

    【讨论】:

      猜你喜欢
      • 2013-10-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-13
      • 1970-01-01
      • 1970-01-01
      • 2023-03-26
      • 2014-05-22
      相关资源
      最近更新 更多