【发布时间】:2018-07-17 16:00:58
【问题描述】:
我已禁用 TLS 1.0 和 TLS 1.1。在 Identity Server 中(使用 WebHostBuilder 在 Service Fabric 集群中运行的 v4,使用自签名证书面向 .NET 4.6.2)。我在 Startup.cs 中添加了以下内容:
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
我收到以下错误:
System.InvalidOperationException: IDX10803: Unable to create to obtain
configuration from: 'https://services.mytest.com:8443/oauth/.well-
known/openid-configuration'. ---> System.IO.IOException: Unable to get
document from: https://services.mytest.com:8443/oauth/.well-
known/openid-configuration ---> System.Net.Http.HttpRequestException: An
error occurred while sending the request. ---> System.Net.WebException: The
underlying connection was closed: An unexpected error occurred on a receive.
---> System.ComponentModel.Win32Exception: The client and server cannot
communicate, because they do not possess a common algorithm
我已经查看了这里的问题:
IDX10803: Unable to create to obtain configuration
Unable to obtain configuration from well-known/openid-configuration
我已经尝试了这些建议(包括将证书添加到受信任的根目录)
【问题讨论】:
-
除了将证书添加到受信任的根目录外,运行应用程序池(托管 IDS)的用户应该被授予对证书的读取权限。你也这样做了吗?
-
应用程序池在 LocalSystem 下运行,我已经在 Local Machine 下添加了证书。
-
记得 localsystem 或 apppoolidentity 有同样的问题,所以我最终为这个应用程序池创建了一个帐户,在这个帐户下运行它,仍然将证书添加到受信任的根目录,并至少提供该帐户读取证书的权利。在这里查看github.com/IdentityServer/IdentityServer3.Samples/tree/master/…。 ids4的步骤是一样的,当然也可以导入自己的cert。
-
我更改了帐户并在个人下添加了证书 (pfx),在受信任的人下添加了证书 (cer)(如链接中所示)。我仍然遇到同样的错误
-
您为用户添加了证书权限?
标签: asp.net ssl identityserver4 tls1.2