1

We get the following error;

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

while using a WebRequest object to make an HTTPS request. The funny thing is that this only happens after a while, and is temporarily fixed when the application is restarted, which suggests that something is being filled to capacity or something.

Has anyone seen this kind of thing before?

buræquete
  • 14,226
  • 4
  • 44
  • 89
Mark Cidade
  • 98,437
  • 31
  • 224
  • 236

4 Answers4

2

I have exactly the same problem! I send two requisitions to an HTTPS webservice in close period range (seconds). The first requisition works fine, but the second requisition fails.

I´ve tried to set "System.Net.ServicePointManager.SecurityProtocol = Net.SecurityProtocolType.Ssl3", but the second requisition freezes...

I´m using VB.NET 2008.

Thanks

Thiago
  • 21
  • 1
  • This actually fixed the problem for me and I doubt I would have found it if it wasn't for your post. Hope you had better luck! Thanks! – proudgeekdad Sep 20 '10 at 19:33
2

I seem to recall having this problem last year. I suspect that you aren't closing your WebRequest objects properly, which is why after a certain amount of use it won't allow you to create any new connections.

Travis
  • 576
  • 5
  • 13
1

The similar problem for me fixed by:

System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
slavoo
  • 5,798
  • 64
  • 37
  • 39
1

It looks like it may be a Conenction: Keep-alive thing: http://blogs.x2line.com/al/archive/2005/01/04/759.aspx#780

Mark Cidade
  • 98,437
  • 31
  • 224
  • 236
  • I get the "The request was aborted: Could not create SSL/TLS secure channel" about once a day in one of my applications that handles a lot of transactions. I set the keep alive property to false and it didn't help any. – Ryan Sampson Mar 08 '10 at 23:05