Force.com-Toolkit-for-NET icon indicating copy to clipboard operation
Force.com-Toolkit-for-NET copied to clipboard

Salesforce is requiring an upgrade to TLS 1.1 or higher by July 22, 2017

Open hukllachay opened this issue 8 years ago • 4 comments

Hi

Just to confirm if the latest version already address the TLS 1.1 or higher requirement of Salesforce?

https://help.salesforce.com/articleView?id=Salesforce-disabling-TLS-1-0&language=en_US&type=1

Thank you

Limber jaimes

hukllachay avatar Jun 27 '17 17:06 hukllachay

As far as I know, no. Our workaround is to call the following before calling AuthenticationClient methods:

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

avesse avatar Jun 28 '17 12:06 avesse

Latest version is broken without this workaround! Using the sample WebServerOAuthFlow.Web project, just adding @avesse 's line of code in CallbackController.Get will work.

Also, the client doesn't handle the HTML response page about the TLS error because it only parses json. https://github.com/developerforce/Force.com-Toolkit-for-NET/blob/313c4b9106b9a0f9779d42514189addc713799a5/src/CommonLibrariesForNET/AuthenticationClient.cs#L80 So you'll get a ForceAuthException saying

Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

DavidDeSloovere avatar Aug 07 '17 09:08 DavidDeSloovere

Thanks for documenting this - it got me up and running again as well.

cemerson avatar Feb 16 '18 13:02 cemerson

There were issues with the PCLs and including ServicePointManager. I'm hopeful that .NET Standard 2.0 will resolve this. I haven't investigated, but if I could move this into the AuthenticationClient itself it would be a big win.

wadewegner avatar Aug 17 '18 23:08 wadewegner