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
Jay GuruswamyJay Guruswamy 

serverurl reset soapclient Destination URL not reset.

Hi,

I am writing an app using visual studio .net(5.0) C# to integrate with Salesforce.

I used "Connected Services" to include the WSDL generated.

System.Threading.Tasks.Task lr = client.loginAsync(LSHdr, userName, password + securitytoken); works fine

When I try to do a DML(say Upsert), it raises {"UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService"}

Since it is Connected Service(not a Web Service), I could not find SforceService.

Also I could not set any values like SessionId, ServerURL etc(i.e dont know how to set them)

Thoughts please.
AnudeepAnudeep (Salesforce Developers) 
I recommend capturing debug logs for this to check which endpoint are the links pointing to. 

As far as I know, after successful login, you need to set the serverURL from the login result. Please see this post to learn more

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you