function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tom HudiburghTom Hudiburgh 

Login failure with "The request was aborted: Could not create SSL/TLS secure channel" error

We have some software that attempts to log into Salesforce and get information from Salesforce on purchase orders. This was working until we updated the Windows OS to Server 2012 R2 from Server 2008 R2.

The login fails with a "The request was aborted: Could not create SSL/TLS secure channel" error.

It appears that the software uses a Salesforce web service to login and get the data.

How can this error be diagnosed? Is there documentation that explains how to use the web service and any computer configuration that is required?

I did not write the code so my knowledge is quite limited in this area.
Best Answer chosen by Tom Hudiburgh
karthikeyan perumalkarthikeyan perumal
Hello, 

if you are trying to connect Salesforce using .net system  or some other, 

try to import following namespace at top of the connecting code. 

if its .Net 4.5
 
// using System.Net;
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
// Use SecurityProtocolType.Ssl3 if needed for compatibility reasons

its not .Net 4.5
 
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;

hope this solve your issue. 

Thanks
karrthik

 

All Answers

karthikeyan perumalkarthikeyan perumal
Hello, 

if you are trying to connect Salesforce using .net system  or some other, 

try to import following namespace at top of the connecting code. 

if its .Net 4.5
 
// using System.Net;
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
// Use SecurityProtocolType.Ssl3 if needed for compatibility reasons

its not .Net 4.5
 
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;

hope this solve your issue. 

Thanks
karrthik

 
This was selected as the best answer
Tom HudiburghTom Hudiburgh
Thank you Karrthik!

The software targets .NET Framework 3.5 so the second method needed to be used. It worked!

Your quick response is greatly appreciated.

Regards,
Tom