0

我正在使用 .NET Core 3.1,并且我有一个 gRPC 服务作为 Windows 服务Server A托管,在确定侦听端口和 url 时具有以下设置:Kestrelappsettings.json

"Kestrel": {
    "EndPoints": {
      "Http": {
        "Url": "http://*:2007",
        "Protocols": "Http2"
      },
      "HttpsInlineCertStore": {
        "Url": "https://*:1007",
        "Protocols": "Http2",
        "Certificate": {
          "Subject": "*.somedomain.com",
          "Source": "Store",
          "Store": "My",
          "Location": "LocalMachine",
          "AllowInvalid": true
        }
      }
    }
}

我从两个客户端使用它,第一个是托管Server B在 IIS 中的 Web 应用程序客户端。第二个客户端是托管在 Windows 服务客户端Server A(托管 gRPC 服务的同一台服务器。

两个客户端都使用 HTTPs 和服务器名称进行通信(有一个 DNS 注册服务器名称和内部网络中的相应 IP):

https://my-server-a:1007

来自外部的连接Server A(托管 gRPC 服务的连接)没有问题成功,来自同一服务器的连接(使用服务器的名称 not localhost)不起作用并出现错误消息:

https 连接验证超时

知道是什么导致了这个问题吗?

4

0 回答 0