Azure Cloud Service的多个HTTPS端点

时间:2016-06-28 09:08:37

标签: c# azure ssl azure-cloud-services

我有一个包含2个Web角色的Azure云服务。使用下面的配置,我可以通过http和https连接到站点1,但只能通过站点2的http连接。有什么明显的我错过了吗?

Site 1
<Sites>
  <Site name="Web">
    <Bindings>
      <Binding name="Endpoint1" endpointName="Endpoint1" />
      <Binding name="HttpsIn" endpointName="HttpsIn" />
    </Bindings>
  </Site>
</Sites>
<Endpoints>
  <InputEndpoint name="Endpoint1" protocol="http" port="80" />
  <InputEndpoint name="HttpsIn" protocol="https" port="443" certificate="mycert" />
</Endpoints>
<Certificates>
  <Certificate name="mycert" storeLocation="LocalMachine" storeName="CA" />
</Certificates>

Site2
<Sites>
  <Site name="Web">
    <Bindings>
      <Binding name="Endpoint1" endpointName="Endpoint1" />
      <Binding name="HttpsIn" endpointName="HttpsIn" />
    </Bindings>
  </Site>
</Sites>
<Endpoints>
  <InputEndpoint name="Endpoint1" protocol="http" port="8081" />
  <InputEndpoint name="HttpsIn" protocol="https" port="445" certificate="mycert" />
</Endpoints>
<Certificates>
  <Certificate name="mycert" storeLocation="LocalMachine" storeName="CA" />
</Certificates>

1 个答案:

答案 0 :(得分:0)

我通过为站点2的https端点使用不同的端口来修复此问题。 Azure Cloud Service似乎不喜欢端口445.