他在那里,
我遇到以下错误...
System.Net.WebException was caught
HResult=-2146233079
Message=The request was aborted: Could not create SSL/TLS secure channel.
Source=System
StackTrace:
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
我正在尝试调用在 Windows 7 中工作的第三方 API.. 但在我升级到 Windows 10 后它失败了...
我还尝试使用下面的代码更改安全协议(protocol)
ServicePointManager.Expect100Continue = true;
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
我也试过像下面这样的一些注册表编辑..
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319
Value: SchUseStrongCrypto
另一个奇怪的问题是它以交替方式连接...... 第一次连接但中止连续请求..
谁能帮我解决这个问题
注意:问题出现在我从 Windows 7 更新 Windows 10 之后。
最佳答案
我认为您使用的是采用 SHA1 加密的网络服务。 Windows 更新将阻止它,因为它有风险。
以下链接列出了更新。 https://blogs.windows.com/msedgedev/2016/04/29/sha1-deprecation-roadmap/
卸载更新,它应该可以工作。它对我有用。 但是,您应该考虑升级该 Web 服务。
到目前为止,我还没有找到以编程方式解决该问题的方法。
关于c# - Windows 10 + 请求被中止 : Could not create SSL/TLS secure channel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38695436/