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
Admin QBP01Admin QBP01 

Could not create SSL/TLS secure channel on API login

I have a C# class connecting to the API. This has worked for about a week, today I get an exception whenever I try login via C#. Even adding the wsdl now throws the exception. "Could not create SSL/TLS secure channel."
I cannot figure out what needs to be changed to allow successful logins again.

URL = https://login.salesforce.com/services/Soap/u/35.0

   var binding = new SforceService { Url = CRMDiscoveryUrl };
   var lr = binding.login(CRMUserName, CRMPassword);
 
Daniel BallingerDaniel Ballinger
This is most likely related to the changes Salesforce have been making around SSL 3.0 and TLS support. See Ensuring my application complies with SSL3.0 being disabled? (http://salesforce.stackexchange.com/a/54962/102)

You can configure .NET to use a specific security profile when creating a secure connection to the Salesforce web services.
Try something like:
System.Net.ServicePointManager.SecurityProtocol = 
SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

What version of .NET are you using?

Failing that, check the the certificates look correct when you access Salesforce.