Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
JM63 opened this issue Sep 9, 2021 · 1 comment
Open

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

JM63 opened this issue Sep 9, 2021 · 1 comment

Comments

@JM63
Copy link

JM63 commented Sep 9, 2021

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

@kaspermogensen1
Copy link

Thanks for sharing the solution!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants