2

我尝试调用远程 REST Web API。我在 Postman 中的测试是成功的。但在 .Net Framework 4.5.2 中并使用 HttpClient 我收到此错误:

请求被中止。无法创建 SSL/TLS 安全通道。

如前所述,我设置了以下内容

System.Net.ServicePointManager.Expect100Continue = true;
System.Net.ServicePointManager.SecurityPortocol = System.Net.SecurityProtocolType.Tls12;

另外,我试过这个

但什么都没有改变。

感谢您在高级的任何帮助!

4

0 回答 0