I'm currently working on a very curious problem with one of our applications.
I have 2 browsers open to simulate 2 customers, both on-prem.
Short version to log in the first guy I do
ConfigFile.WebServices.RemoteBaseURL = "host/remote/services82";
ConfigFile.Services.ApplicationToken = "123";
ConfigFile.Services.DefaultMode = ServiceMode.Remote;
This works correctly.
Now the second user tries to log in and the code goes:
ConfigFile.WebServices.RemoteBaseURL = "NEW-HOST/remote/services84";
This does not work.
I also tried clearing out the session prior to the new request:
Upon further inspection of the SOAP package sent for the second request I can see that it sent a package with the expectation of working with a services82 endpoint as it did with the first user, even though the RemoteBaseURL is a services84 endpoint.
POST https://customerHost/Remote/Services84/SoPrincipal.svc HTTP/1.1
Content-Type: text/xml; charset=utf-8
So I guess the question is, how do I make sure that the authenticate SOAP request uses the Services endpoint that the RemoteBaseURL indicates for every on-prem tenant our application is communicating with?