Could not create ssl tls secure channel salesforce

Could not create SSL/TLS Secure Channel?

The “The request was aborted: Could not create SSL/TLS secure channel” exception can occur if the server is returning an HTTP 401 Unauthorized response to the HTTP request. You can determine if this is happening by turning on trace-level System.Net logging for your client application, as described in this answer.

Why does the SSL/TLS negotiation fail?

The error is generic and there are many reasons why the SSL/TLS negotiation may fail. The most common is an invalid or expired server certificate, and you took care of that by providing your own server certificate validation hook, but is not necessarily the only reason.

Why can’t I connect to the server with TLS?

You need to find out which version (s) of TLS are supported by the server, and make sure those protocols are enabled for client requests on your computer. There may also be a mis-match between the enabled ciphers on the client and the server.

Why isn’t TLS enabled by default in my application?

The reason why the security protocol didn’t default to TLS 1.2 in my application is because it was running on .NET 4.6.2, and in .NET 4.6x there is no default set for the security protocol. Also, it was running on a version of Windows (2012 R2) that didn’t have newer versions of TLS enabled by default.

Leave a Comment