Could not create SSL/TLS secure channel, despite setting ServerCertificateValidationCallback

后端 未结 8 1573
醉酒成梦
醉酒成梦 2020-12-04 17:29

I\'m trying to establish SSL/TLS connection to test server with self-signed certificate. Communication through unsecure channel worked without issues.

8条回答
  •  Happy的楠姐
    2020-12-04 18:01

    TLS 1.0 and 1.1 are now End of Life. A package on our Amazon web server updated, and we started getting this error.

    The answer is above, but you shouldn't use tls or tls11 anymore.

    Specifically for ASP.Net, add this to one of your startup methods.

            public Startup()
            {
                ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12;
    

    but I'm sure that something like this will work in many other cases.

提交回复
热议问题