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

Hi,

We have this card payment function on our webpage. Now the vendor has upgraded so that they don't support TLS 1.0 and SSL 3.0. Obviously we make a request with those protocols so we get this error:

The request was aborted: Could not create SSL/TLS secure channel.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
 
Exception Details: System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
The request was aborted: Could not create SSL/TLS secure channel.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
 
Exception Details: System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.

Open in new window


I've checked and seen that the server (Windows server 2012) has framework 4.5.2 installed, and also the asp.net project is targeted to the same framework. If I understand it rightly this is what is required. Still I get this error. Do I have to disable the protocols, if so how? Or is there any other issues I need to solve?

Thanks for help!

Peter
Peter NordbergIT ManagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Snarf0001Commented:
Not quite all that is needed.  In 4.5, Tls1 and SSL3 are still the default values when you're making external requests.

You need to enable them on the ServicePointManager.Security protocol, in Global.asax
protected void Application_Start()
{
	//other code

	ServicePointManager.SecurityProtocol = ServicePointManager.SecurityProtocol | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
}

Open in new window


This will enable the proper protocols, while still leaving ssl3 and tls1 enabled as well.  Usually this is enough, and is a nice catch-all in case any old vendors still DON'T implement 1.1 / 1.2.

If you still have problems, then try leaving it as only 1.1 and 1.2:
protected void Application_Start()
{
	//other code

	ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
}

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Peter NordbergIT ManagerAuthor Commented:
Thanks, Worked perfectly!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.