Trigger Session End

Trigger Session End

  

Hi,

I want my web app to auto logout if the session end.

How can I achieve that ?

Thanks in advance.

Hi tBt,

When the session expires (timeout), the user is automatically logged out. If he tries to do anything that requires a logged user (registered or from role), it will be sent to the Login page.

If it is not what you mean, could you elaborate your question?

Cheers,
Eduardo

Hi Jauch,

Ic, the problem is I also tick anonymous in all my screen, so It not redirected to login page.

Thanks.

Hi Jauch, 

I've remove the tick on anonymous but when session end, it still doesn't trigger to login page when the menu clicked.

I wonder if I misunderstood your advice.

Please kindly help.

Thanks in advance.

Hi tBt,

There are 2 things you need to check.

1. The session. By default, in a dot net stack, takes 20 min to expire, if the user don't do anything.

2. If the page associate with the menu still have the anonymous role checked, even after 20 min of inactivity the user will be able to navigate to it.

But as soon as he does something that requires an active login, by default, if you didn't messed with the exceptions (usually defined in the common flow of the module that has the application theme), the user will be redirected to the login page.

So, are you letting the session expire?

Are the pages to where you are navigating not set to anonymous?

Have you changed something in the exceptions in the common flow or are your module definitions pointing to the handler of the exceptions correctly? 

And last, as usually we use a common login to all applications, are you using any other application in the same browser with the same user? This would prevent the session from expire, if I'm not mistaken...

Hi Ed,

I've tried to check from another dummy web that I've created about the exception and I've made it same.

But still my web app not autologout.

I've also tried to put debug point on the exception, but nothing happened.

Any idea ?


The screen that I tried to navigate after session end.


Hi tBm,

Stacks Dot Net have a default value for session time out of 20 min. Java stacks I think the default value is 60 min.

To a 'natural' session timeout you need to wait that time. 

Solution

Has the user selected "Remember Me" on the login page? Are you sending "True" to the "Persistent" paramter of the Login or User_Login action? If so, that's the issue. "Remember Me" is confusing. It does NOT store the username like it sounds like, it is more like "never log me out".

J.Ja

Solution

Hum...

Accordingly the documentation, the timeout of the persistent login is of 10 days.

Logout and login without the remember me option to test if this is the actual problem.

The logout will terminate the persistent login. And if it is the problem, the 20min session timeout will work.

Cheers 

Eduardo Jauch

tq James, yes It's because the remember_me value.

My team remove the check on screen, but not setting the value to false.

tBt wrote:

tq James, yes It's because the remember_me value.

My team remove the check on screen, but not setting the value to false.

Great! Glad to help!

J.Ja