question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

We recently moved to a server 2016 machine and we had the following error:

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

After some playing around and everything I found out that if I put in the following line of code before all cert calls it works fine:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

When we were on Server 2008 this wasn’t an issue. I’ve seen this as an error on other libraries as well and they ended up forcing Tls in the library. What was odd was I had no problem locally when testing, only when deployed to the server.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:13

github_iconTop GitHub Comments

4reactions
chrisdunelmcommented, Feb 9, 2017

I’m not exactly clear what’s going on here. .NET4.6 changes the default set of enabled SSL/TLS protocols from .NET4.5 Windows Server 2016 appears to now explicitly not support SSL, only support TLS.

So this might be a combination of code built for .NET4.5, which is trying to use SSL by default (rather than TLS) on Windows 2016 (which doesn’t support SSL), although I’m not clear if this is really the case.

I agree that the client library code shouldn’t force ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;, although we could possibly OR in Tls12 support. I.e. have ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12; somewhere in the library code; although it is possible this may break some code.

Unfortunately I can’t see a way to just enable TLS support for the HttpClient that we use. It appears to only be a global setting.

2reactions
Eckeecommented, Feb 26, 2018

@jskeet I’m so sorry, I found the solution in another thread, I had to manually update to 1.24, that was the case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - The request was aborted: Could not create SSL/TLS ...
Another possible cause of the The request was aborted: Could not create SSL/TLS secure channel error is a mismatch between your client PC's...
Read more >
The request was aborted: Could not create SSL/TLS ...
Open Run Prompt and run gpedit.msc · Navigate to "Administrative Templates > Network > SSL Configuration Settings" · Open SSL Cipher Suite Order ......
Read more >
The request was aborted: Could not create SSL/TLS ...
This error generally will correspond to firewalls, proxies or DNS filtering blocking the connection or an SSL/TLS cipher misconfiguration. Topics covered in ...
Read more >
Could not create SSL/TLS secure channel.
However, the "Could not create SSL/TLS secure channel" error usually means that there's something wrong with the server certificate, e.g. the certificate is...
Read more >
.NET Error - The request was aborted: Could not create ...
This exception message typically indicates that a secure channel could not be created due to the client application failing to specify a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found