【发布时间】:2021-07-15 15:18:45
【问题描述】:
我无法通过 c# 发送 https 请求我尝试使用我找到的所有答案,但我遇到了同样的错误 (无法为 ssl/tls 建立安全通道) 我添加了这行代码,并没有解决问题
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Ssl3|SecurityProtocolType.Tls;
但是当我使用 Windows 10 时请求正常工作,但在 Windows 7 中无法正常工作,尽管如果我通过 Fiddler 或 Postman 发送请求,它在 Windows 7 中工作
【问题讨论】:
-
您是否尝试过启用 TLS 1.2 according to the documentation?另见admin-enclave.com/en/articles/windows/…
标签: c# .net http https httpwebrequest