This is a migrated thread and some comments may be shown as answers.

Session Timeout based on Inactivity

3 Answers 252 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Philip
Top achievements
Rank 1
Philip asked on 08 Sep 2011, 07:09 PM
I was able to accomplish session expiration using the notification control set up for my web application thanks to this demo:

http://demos.telerik.com/aspnet-ajax/notification/examples/sessiontimeout/sessionexpired.aspx

However, this approach is based on a set timeout value and the notification just pops up every timed interval, regardless if the user is active or not. Can the session timeout be set/reset dynamically based on user inactivity? Possibly every time there is an Ajax request call? Some sample codes would be much appreciated. Thanks.

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 13 Sep 2011, 03:43 PM
Hi Philip,

You can call the ContinueSession() function that will postpone the appearance of the RadNotification (and, therefore, the redirect) on the event which you consider activity - in the OnResponseEnd for the AjaxManager for example.


Kind regards,
Marin
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
SDI
Top achievements
Rank 1
answered on 23 Nov 2012, 05:21 AM
Mmm, is this even possible with a master page? i have the RadNotification on the master page, the RadAjaxManager are all on the aspx pages. the continuesession logic is in the master script code, not on the aspx pages. do you have an example of this?

thanks

0
SDI
Top achievements
Rank 1
answered on 23 Nov 2012, 06:04 PM
the content page can have the OnResponseEnd event firing the ContinueSession event that is located in the master page js. so it is possible and works like a charm. 
Tags
Notification
Asked by
Philip
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
SDI
Top achievements
Rank 1
Share this question
or