Sha*_*sum 6 sslhandshakeexception windows-server-2012-r2 .net-5
我在生产服务器上使用 Windows Server 2012 R2。我将 Web 应用程序从 4.5 升级到 .Net 5.0。现在,当我的前端应用程序与基于 .Net 5.0 构建的后端 REST API 进行通信时,随机遇到此错误:
异常[System.AggregateException:发生一个或多个错误。(无法建立 SSL 连接,请参阅内部异常。) ---> System.Net.Http.HttpRequestException:无法建立 SSL 连接,请参阅内部异常。---> System.Security.Authentication.AuthenticationException:身份验证失败,因为远程方发送了 TLS 警报:“HandshakeFailure”。---> System.ComponentModel.Win32Exception (0x80090326): 收到的消息是意外的或格式错误。
--- 内部异常堆栈跟踪结束 ---
我已经在我的应用程序中使用了以下代码行:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls13;
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2206 次 |
最近记录: |