Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

Closed
AliLandau opened this issue Oct 31, 2017 · 6 comments
Closed

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

AliLandau opened this issue Oct 31, 2017 · 6 comments

Comments

@AliLandau
Copy link

I am using the sandbox to test Authorize.net in Dynamics AX. I am getting this error

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.

I have upgraded to .net 4.6 but still getting the error.

@NexWeb
Copy link

NexWeb commented Oct 31, 2017

using System.Security.Authentication;
using System.Net
// Prior to your web request ...
          const SslProtocols _Tls12 = (SslProtocols)0x00000C00;
          const SecurityProtocolType Tls12 = (SecurityProtocolType)_Tls12;
          ServicePointManager.SecurityProtocol = Tls12;

@njsimha30
Copy link

NexWeb, I had the same issue and your solution worked. Thanks.

@NexWeb
Copy link

NexWeb commented Nov 8, 2017

@njsimha30, very good. Glad to hear it.

@digioz
Copy link

digioz commented Dec 8, 2017

This is great @NexWeb . Thanks for the help!

@bhautik1907
Copy link

bhautik1907 commented Jul 24, 2019

@NexWeb You are a LEGEND! Thanks

@MikeOtown
Copy link

VB version?

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

No branches or pull requests

7 participants
@digioz @NexWeb @MikeOtown @AliLandau @njsimha30 @bhautik1907 and others