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
VinHVinH 

{!API_Enterprise_Server_URL_70} merge field != loginResult.serverUrl returned from login()

I need to enable login by passing the server Url and the Session Id from the Salesforce UI (web tab) to a .NET application.
 
I believe my LoginWithSessionId() procedure fails because the URL passed from the Salesforce merge field is slightly different from the server URL returned by the SF login() called when login() is supplied with a username and password.
 
Does anyone know why these URLs are different, and how I can pass the correct URL from the Salesforce UI?
 
- thanx
VH
SuperfellSuperfell
The merge field will return an API URL to the application servers that you started from, this is to stop you running into cross domain scripting problems if you use this URL from ajax or something else browser based.

The login call will return you an API URL to the dedicated API server farm. Both URLs provide exactly the same service.

So yes, they are potentially different, but it should make no difference what so ever.


The other reason they might be different is if your login code is using the Partner API, or using an older version of the enterprise API, then the merge field version you selected.
VinHVinH

Thanks Simon. You cleared it all up for me!

- V