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

后端 未结 30 1794
遇见更好的自我
遇见更好的自我 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 01:46

    The solution to this, in .NET 4.5 is

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
    

    If you don’t have .NET 4.5 then use

    ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
    

提交回复
热议问题