【问题标题】:Azure web role with two sites, cannot bind to two different endpoints具有两个站点的 Azure Web 角色,无法绑定到两个不同的端点
【发布时间】:2012-03-13 08:31:05
【问题描述】:

在单个 azure Web 角色中,我有两个端点。我有两个站点,每个站点都绑定到不同的端点。像这样:

<WebRole name="MyWebRole">
    <Endpoints>
      <InputEndpoint name ="HttpIn" protocol="http" port="80"/>
      <InputEndpoint name="HttpsIn" protocol="https" port="443" certificate="Certificate1" />
    </Endpoints>
    <Sites>
      <Site name="Web">
        <Bindings>
          <Binding name ="HttpsIn" endpointName="HttpsIn"/>

        </Bindings>

      </Site>
      <Site name="Open" physicalDirectory="..\..\NotSecure">
        <Bindings>
          <Binding name ="HttpIn" endpointName="HttpIn"/>
        </Bindings>
      </Site>
    </Sites>

在调试器中运行时,我收到一条错误消息

“将调试器附加到用于角色实例的 URL“http://127.255.0.0:82”的 IIS 工作进程时出错 ....

好的,所以查看 IIS 管理器,我找到了部署。点击:http://127.255.0.0:82/ 浏览。它很好。浏览到另一个。该网站也出现了。

但是,确认错误会停止调试器并删除部署。

这种配置是不允许的吗?宁愿避免使用虚拟目录。只希望在同一个域上基于 http 或 https 运行两个非常不同的网站。缺少什么?

【问题讨论】:

    标签: binding azure web role endpoints


    【解决方案1】:

    有一个技巧在很多地方都没有提到。如果您有一个名称为 Web 的站点,则某些信息会被默认值覆盖,包括一些绑定信息。尝试将您的第一个站点的名称更改为其他名称,例如“安全”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-03-03
      • 2017-05-09
      • 2018-11-10
      • 1970-01-01
      • 1970-01-01
      • 2017-02-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多