We’ve developed some resources to help you work effectively from home during COVID-19 Click to learn more

Multi-tenant onprem solution reaching correct endpoint, but wrong SOAP package

Hey there,

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:


Didn't help.

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
SOAPAction: "http://www.superoffice.net/ws/crm/NetServer/Services82/SoPrincipal/AuthenticateUsernamePassword"
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<h:ApplicationToken xmlns:h="http://www.superoffice.net/ws/crm/NetServer/Services82">token</h:ApplicationToken>
<AuthenticateUsernamePassword xmlns="http://www.superoffice.net/ws/crm/NetServer/Services82">

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?

Inga svar ännu!