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
mangiamangia 

How to re-login/re-authenticate the user when Sales Force session timeout occurs?

We are integrating our .NET Web Application into SaleForce.   We login and use the Sales Force web service API.  When user's session times out in SalesForce while on our custom tab, how should we handle - What's best practice?
 
Example:
1) User logins into Sales Force
2) User clicks on custom tab, which calls our web app passing sessionId and serverUrl in query string
3) Our web app gets SF sessionId and serverUrl and calls:
           SalesForceApi.GetUserInfoResult userInfoResult = salesforceApi.getUserInfo();
           ... and uses our web app from within Sales Force custom tab
4) Hours later, Sales Force session timeouts, and Sales Force login page is displayed
5) User logins back into Sales Force
6) How should our web application behave as our 'SalesForceApi' session state object has an expired sessionId?  One option is to direct user to re-click on our custom tab (to pass our web app the new sessionId and serverUrl in query string) but there must be an better way to handle.
 
 
 
 
mangiamangia

No responses?  Can I assume Sales Force session timeout is just something the user must deal with?

Chris