c# - Azure 云服务的多个 HTTPS 端点

标签 c# azure ssl azure-cloud-services

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

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>

最佳答案

我通过为站点 2 的 https 端点使用不同的端口来解决此问题。似乎 Azure 云服务不喜欢端口 445。

关于c# - Azure 云服务的多个 HTTPS 端点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38071806/

相关文章:

java - 使用其他 PC 时出现 SSL 验证程序异常

c# - 等待来自多个线程的任务

c# - 从 C# 调用 MySQL 存储过程时的奇怪问题

c# - 字符串插入数据库时​​单引号转义

azure - 如何为 Azure Function 分配静态公共(public) IP

c# - 使用 .NET Core 3.1 和 HttpContext 的客户端 IP 地址错误

sql-server - VNET 上 Azure 数据库的弹性查询

apache - 网站 ERR_CONNECTION_RESET - 客户端未向服务器发送 SSL hello 数据包

c++ - 使用 SSL_get_certificate() 时 OpenSSL API 崩溃

c# - 错误必须使用表值参数声明标量变量