Some tips about session handling and persistent login

Some tips about session handling and persistent login


If your web application users require a recurrent login, keeping context about what he was doing, maybe you'd like to take advantage of the "persistent login" feature.

Using the "persistent" option of the "Login" and "LoginPassword" built-in actions, the user be automatically logged in the application whenever he tries to access it.

Nevertheless, you need to be careful about session state. The Hub Server stores the value of every eSpace Session Variable in the ASP.NET state services (either in process, in state service or database).
So, if you use persitent login in an application with session variables, be careful to define the OnSessionStart action and populate session variables values. The OnSessionStart action is automaticaly executed by the Hub Server, whenever a new session is created.

If you do so, the end user will transparently use the application as if the session was not expired at all.

For more information about the concepts here presented, please take a look at the following Service Studio help topics:

Language Reference > Built-in Actions > Login action
Language Reference > Built-in Actions > LoginPassword action
Using callbacks > On Session Start callback
Building Actions > Objects and its scope > Variables > About session variables