一、问题描述
报错信息如下:
System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String'.\r\n ---> System.IO.IOException: IDX20804: Unable to retrieve document from: 'System.String'.
---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot
at System.Net.Security.SslStream.SendAuthResetSignal(ProtocolToken message, ExceptionDispatchInfo exception)
at System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
--- End of inner exception stack trace ---\r\n at
拿出报错关键字‘errors in the certificate chain: UntrustedRoot’
二、解决办法
这就是证书链的问题,安装证书文件时,里面是多个一起的,把里面对应的证书在证书管理器里删掉,然后重新安装就好了。
这篇博客主要介绍了在遇到系统抛出的`InvalidOperationException`和`IOException`,特别是报错信息中包含'errorsinthecertificatechain:UntrustedRoot'时,如何诊断和解决SSL连接无法建立的问题。解决方案是删除证书管理器中不信任的根证书,然后重新安装证书文件,确保证书链的完整性和可信度。
2558

被折叠的 条评论
为什么被折叠?



