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
RathishRathish 

Need a solution for "Destination URL Not reset" Error

 

Hi. We have developed a website that is interacting with Salesforce .

Sometimes I am getting this error while trying to connect SFDC. “Destination URL not Reset “.

 

Below is the login procedure I am using for SFDC login.

 

cobjBinding = new cForceService();

cobjBinding.QueryOptionsValue = new webrefSForce.QueryOptions();

cobjBinding.QueryOptionsValue.batchSize = 1000;

cobjBinding.QueryOptionsValue.batchSizeSpecified = true;

cobjLoginResult = cobjBinding.login(strUserName, strPassword);

cobjBinding.SessionHeaderValue = new webrefSForce.SessionHeader();  cobjBinding.SessionHeaderValue.sessionId = cobjLoginResult.sessionId;

cobjBinding.Url = cobjLoginResult.serverUrl;

 cobjbinding object is using in the application to make any query from SFDC . Please give your valuable feedback to resolve this issue.

SuperfellSuperfell

I would image that you are sharing the instance of this class amongst multiple threads and they are stomping on each other state (e.g. thread 1 get to the cobjBinding = new cForceService(); line as thread2 si doing cobjBininding.query, now the query call goes to the login endpoint, instead of where it should go). make sure each thread has its own instance of the stub.

RathishRathish

Thanks Simon for your reply..

 

In application next thread is executing after the completion of first thread so there is no overlap .

 

here i want to give more details about the code so u can put up ur point.

 

1. i am using below session variable

 

public static webrefSForce.SforceService cobjBinding = null;

 

2.Below is the login code.

 

cobjBinding = new cForceService();

cobjBinding.QueryOptionsValue = new webrefSForce.QueryOptions();

cobjBinding.QueryOptionsValue.batchSize = 1000;

cobjBinding.QueryOptionsValue.batchSizeSpecified = true;

cobjLoginResult = cobjBinding.login(strUserName, strPassword);

cobjBinding.SessionHeaderValue = new webrefSForce.SessionHeader();

cobjBinding.SessionHeaderValue.sessionId = cobjLoginResult.sessionId;

cobjBinding.Url = cobjLoginResult.serverUrl;

 

3.The Line of code causing error.

 

webrefSForce.DescribeSObjectResult objDescribeSObjectResult = cobjBinding.describeSObject("Lead");

 

and to resolve this error i tried to re-login and call same procedure again in exception block but it does not work.