Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: RE: Session TimeOut ...


Message #1 by Melissa Mussitsch <melissa.mussitsch@a...> on Tue, 4 Jun 2002 13:02:27 -0400
I appreciate everyone's response.
Naturally, I went with this one liner since it would be the quickest thing
to try.
I did add this one line, but it didn't work.  Is there anything else I need
to do with it?
If not - I'll have to move on to suggestion #2.

Thanks.
Melissa

-----Original Message-----
From: Alex Shiell, ITS, EB, SE [mailto:alex.shiell@s...]
Sent: Thursday, May 30, 2002 11:48 AM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Session TimeOut ...


I prefer to prevent the session from timing out while the application is on
the screen, by using this line

<META HTTP-EQUIV="refresh" CONTENT="<%=((session.Timeout * 60)-10)%>">
 
 -----Original Message-----
From: Debreceni, David [mailto:david_debreceni@r...]
Sent: 30 May 2002 16:26
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Session TimeOut ...


This is what we use to redirect users when their session times out.  It is
just a javascript, but it works and will reset everytime the page is
refreshed.
//Code for the session timer 
        var mytime = 0; 
        var mysecs = 0; 
        var Errormsg = "Your session has timed out." 
        function sessionTimer() { 
                mysecs++ 
                if (mysecs == 60) { 
                        mytime++; 
                        mysecs = 0; 
                } 
                setTimeout("sessionTimer()", 1000); 
                if (mysecs < 10) { 
                        defaultStatus = "Session Time: " + mytime + ":0" +
mysecs; 
                        window.Status += "Session Time: " + mytime + ":0" +
mysecs; 
                } 
                else 
                { 
                        defaultStatus = "Session Time: " + mytime + ":" +
mysecs; 
                        window.Status += "Session Time: " + mytime + ":" +
mysecs; 
                } 
                //Code for the redirect 
                if (mytime >= timeOut) { 
                        window.location 
"http://yourdomain/errorpage.asp?ErrorMsg=" + Errormsg; 
                } 
        } 
        sessionTimer(); 
hope that helps 
David Debreceni 
Senior Visual Basic/ASP Developer 
xxx-xxx-xxxx  x 1086 


-----Original Message----- 
From: Oleg Kapeljushnik [mailto:c-oleg.kapeljushnik@w...] 
Sent: Thursday, May 30, 2002 11:07 AM 
To: ASP Web HowTo 
Subject: [asp_web_howto] RE: Session TimeOut ... 


Hi Mellisa ! 
I didn't find anyway to do it :(. 
What I am doing is set some function to be executed when this timeout 
time passed. The tricky thing here is that this function must to be reset 
every time when new page are requested from the server since this timeout 
start countdown from last page request. 
Let me know if you find some better and simplest solution from mine 
cause I know that its works so far but I defiantly would like 
to improve it. 
Oleg. 
-----Original Message----- 
From: Melissa Mussitsch [mailto:melissa.mussitsch@a...] 
Sent: May 30, 2002 10:36 AM 
To: ASP Web HowTo 
Subject: [asp_web_howto] Session TimeOut ... 


I am not using a Session Object with ASP, but just the Connection Timeout 
period set on the Web Site.  I wanted to know if there was a way to trap 
for the timeout so that I can display something friendlier than the 
typical "You are not authorized to view this page" page that gets 
displayed. 
Any ideas? 
Thanks. 
Melissa Mussitsch 
--- 
Improve your web design skills with these new books from Glasshaus. 
Usable Web Menus 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme 
r-20 
Constructing Accessible Web Sites 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme 
r-20 
Practical JavaScript for the Usable Web 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme 
r-20 
--- 



--- 
Improve your web design skills with these new books from Glasshaus. 
Usable Web Menus 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme 
r-20 
Constructing Accessible Web Sites 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme 
r-20 
Practical JavaScript for the Usable Web 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme 
r-20 
--- 
--- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20 --- Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to  

________________________________________________________________________
Scottish Enterprise Network
http://www.scottish-enterprise.com

Headquarters Address & Contact Numbers

150 Broomielaw
5 Atlantic Quay
Glasgow
G2 8LU.
Tel:  +44 (0) 141 248 2700.
Fax:  +44 (0)141 221 3217

 This message is sent in confidence for the addressee only.
It may contain legally privileged information. The contents are not to
be disclosed to anyone other than the addressee. Unauthorised recipients
are requested to preserve this confidentiality and to advise the sender
immediately of any error in transmission.




---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20

  Return to Index