B2.NET icon indicating copy to clipboard operation
B2.NET copied to clipboard

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

Open JM63 opened this issue 3 years ago • 1 comments

I've been working with B2.NET C# Client for some time with some success, but lately my application stopped working for no apparent reason.

I verified that whenever I created the B2 client var client = new B2Client(_b2AccountId, _b2ApplicationKey); It raise the error "The request was aborted: Could not create SSL/TLS secure channel."

The solution I found to get the application working was to put the following code before creating the client:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12
| SecurityProtocolType.Ssl3;

I hope it helps others with the same problem, however I would like to know if it would not be possible to embed this code snippet in the B2.NET?

Thanks

JM63 avatar Sep 09 '21 14:09 JM63

Thanks for sharing the solution!

kaspermogensen1 avatar Dec 17 '21 13:12 kaspermogensen1