This topic is locked

Session Time Out Notification Dialog Box

9/30/2010 1:56:59 PM
ASPRunnerPro General questions
M
mnegrete author

I completely understand how to extend the session time out period, which this post is not related to.
PROBLEM: When using the app and step away, then come back and start entering data again only to hit save and get kicked out because your session had timed out. Extending the session timeout to infinity is not an option. It waste server memory and also keeps the app live so that anyone could sit down and peruse the data.
QUESTION: Is there a way to pop-up a dialog box (windows or asp runner) that notifies you that your session is about to or has expired so hat you can either keep it alive or know you'll have to log back in before entering any new data?

Sergey Kornilov admin 9/30/2010

You can use Javascript Page OnLoad event and the following code to warn user that session is about to expire.
Here is the barebone example:

setTimeout("sessionAlert()", 15* 60 * 1000);

function sessionAlert()

{

alert("Your Session will time out in 5 minutes");

}