【发布时间】:2021-08-04 06:20:31
【问题描述】:
我有 IdentityServer4 和 MVC 核心应用程序和 React 作为客户端。在本地主机上一切正常,但是一旦我尝试在 docker ubuntu 中部署所有内容,我就会遇到证书问题
System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch, RemoteCertificateChainErrors.
React 应用完美运行,但 mvc 无法从 .well-known/opendid-configuration 获取配置。我知道这个麻烦是由自签名证书引起的。我尝试使用dotnet dev-certs https -ep... 创建证书。但它没有用。所以现在我想禁用证书检查。当我尝试使用config.RequireHttpsMetadata = false; 禁用元数据时,我该怎么做?我也知道我可以使用禁用 CertificateValidation
ServicePointManager.ServerCertificateValidationCallback = (s, certificate, chain, sslPolicyErrors) => true;
但我不知道如何调用这个委托?
也许还有其他可能的方法来解决这个问题?
【问题讨论】:
-
类似that ?
标签: certificate ssl-certificate identityserver4