B2.NET
B2.NET copied to clipboard
The request was aborted: Could not create SSL/TLS secure channel
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
Thanks for sharing the solution!