The request was aborted: Could not create SSL/TLS secure channel

后端 未结 30 1783
遇见更好的自我
遇见更好的自我 2020-11-22 01:21

We are unable to connect to an HTTPS server using WebRequest because of this error message:

The request was aborted: Could not create SSL/TLS secur

30条回答
  •  终归单人心
    2020-11-22 02:07

    Something the original answer didn't have. I added some more code to make it bullet proof.

    ServicePointManager.Expect100Continue = true;
            ServicePointManager.DefaultConnectionLimit = 9999;
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3;
    

提交回复
热议问题