Groups | Blog | Home
all groups > inetserver asp general > august 2003 >

inetserver asp general : idle session


Iona
8/31/2003 10:59:26 PM
Hi,

usually session expires in 20 minutes, well mine is and I want to redirect the user to an error page telling them that their session has expired and they need to login again. How do I code that and where should I put it? Thanks.

-----------------------------
This message is posted by http://Asp.ForumsZone.com
AHN
9/1/2003 10:24:18 AM
On some former page of your application start some session variable and at
the top of the page, in server side code, check if the value you had set is
still there. If the session is over, the variable will be empty, so your
server will know the sesion is over and redirect the client if so. Cheers.

[quoted text, click to view]
the user to an error page telling them that their session has expired and
they need to login again. How do I code that and where should I put it?
Thanks.
[quoted text, click to view]

Ken Schaefer
9/1/2003 4:03:55 PM
You can't do that using ASP, since ASP runs on the server, and once a page
is sent to the client, the server doesn't know anything about it anymore.

Instead, you can create a client-side refresh, eg using a javascript
timer -or- a meta refresh tag, that redirects the user after 20 minutes, eg:

<head>
<meta http-equiv="refresh" content="1200;URL=/loginpage.asp" />
</head.

Cheers
Ken


[quoted text, click to view]
: Hi,
:
: usually session expires in 20 minutes, well mine is and I want to redirect
the user to an error page telling them that their session has expired and
they need to login again. How do I code that and where should I put it?
Thanks.
:
: -----------------------------
: This message is posted by http://Asp.ForumsZone.com
:

AddThis Social Bookmark Button