Ashish Bharadwaj
Ashish Bharadwaj

Reputation: 11

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

Sometimes my client is getting an error during the payment process:

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

Authorize.NET has been used for the payment system. .Net 4.0 Framework is being used. This error is occurring sometimes, why?

Upvotes: 1

Views: 1880

Answers (2)

Andrew Gale
Andrew Gale

Reputation: 107

Please try this suggested answer on github to https://github.com/AuthorizeNet/sdk-dotnet/issues/203:

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;

(Comment by NexWeb.)

Upvotes: 2

hasnayn
hasnayn

Reputation: 356

This is happening due to invalid version of .NET Braintree SDK.

You need to update the .NET Braintree SDK you're using to at least version 3.1.0, the minimum version that supports TLS 1.2. Once complete, you can validate your setup using the steps here.

Also, you need to update the .net version from 4.0 to 4.5

For more information, check this link.

Upvotes: 0

Related Questions