在将证书安装到“受信任的根证书颁发机构”的
本地计算机
存储器后,.NET WebRequest
仍然会抛出以下异常:The request was aborted: Could not create SSL/TLS secure channel
ServicePointManager.SecurityProtocol
现在包含SecurityProtocolType.Ssl3
| SecurityProtocolType.Tls
。
在阅读了Simon Dugré的答案https://dev59.com/vXE85IYBdhLWcg3wRBRU#2904963之后,我进行了以下设置:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
它运行良好。 设置后:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls;
它仍然可正常工作。我有两个问题:
为什么它仍然可以工作?是否有一定的缓存机制?
之前为什么只使用标志
Ssl3
而不是同时使用Ssl3
和Tls
呢?