Sonoma Partners Microsoft CRM and Salesforce Blog

Retry Your Request

Today's blog post was written by Nathen Drees, Senior Developer at Sonoma Partners.

Recently we ran into an interesting issue while trying to create an application that could talk to Salesforce. We were using the Toolkit for .NET and had set up a connected application, but every time we tried to authenticate, we would receive the same error:

Nathen 1

Our application at the time was also pretty straight forward, just trying to log in and authenticate:

Nathen 2

After double and triple checking the credentials, and much head scratching, we finally found the solution. It turns out this was another case of the TLS 1.0 to TLS 1.1/1.2 switch coming back to bite us. Since .NET < 4.6 uses TLS 1.0 by default, we were using a now unsupported transport security protocol, and Salesforce was giving us the very unhelpful error message of “retry your request.” After telling .NET to use TLS 1.1/1.2, everything went smoothly:

Nathen 3

It turns out this has been found before (see this Github issue), but it’s relatively difficult to find this unless you already know what you’re looking for.

Just another day in the life of a Salesforce developer!

Topics: Salesforce