Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > idle session

Reply
Thread Tools

idle session

 
 
Iona
Guest
Posts: n/a
 
      09-01-2003
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

 
Reply With Quote
 
 
 
 
Ken Schaefer
Guest
Posts: n/a
 
      09-01-2003
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


"Iona" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
: 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
:


 
Reply With Quote
 
 
 
 
AHN
Guest
Posts: n/a
 
      09-01-2003
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.

"Iona" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Timeout problems-web.confg session state and IIS session s =?Utf-8?B?Um9iSEs=?= ASP .Net 4 04-11-2007 04:52 PM
Idle TCP session over Cisco PIX Ilan Cisco 1 05-17-2005 06:27 AM
Session-Timeouts and Idle-Timeouts on AS5300 and AS5800 Matt Cisco 1 02-17-2004 06:59 PM
Session State - What does it take to establish one single ASP.NET session per "browser session" Jeff Smythe ASP .Net 3 01-02-2004 04:10 AM
How can I "know" the difference between a session timed out and a session that did session.abort? Jazzis ASP General 2 09-23-2003 07:16 AM



Advertisments