首页 > 解决方案 > 我有基于 .net 框架 4.6.2 构建的 .net 应用程序。我的 http 请求由于 SSL 错误而失败的原因可能是什么?

问题描述

因此,我的 .net 应用程序对支持 TLS 版本 1.3 的服务器进行 API 调用。我的应用程序在大多数环境中都能顺利运行,但在 Windows 7 中,由于 SSL 错误,如下所示,对 API 服务器的 Httprequests 失败。

1.InnerException: System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
2.The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel

注意:我可以通过浏览器访问 API 服务器,没有任何证书信任问题。此外,我在 ServicePointManager 中添加了所有安全协议。

标签: .netapihttpssltls1.2

解决方案


推荐阅读