Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session_OnEnd redirect

Status
Not open for further replies.

jgeisler

Programmer
Dec 3, 2001
1
US
I am attempting to use ASP to do something which seems like it should be simple enough. If a user's session times out, I want to redirect them back to the login page so that they can log back in and start their session again.

It seems to me that the easiest way to do this(wihtout having to check the validity of the session object on every page) is in Session_OnEnd in Gobal.asa, but I understand that the Response and Request objects are unavailable.

Any ideas?
 
I don't know if you can use the Session_onEnd but I have a very simple solution that works fine on my site. When a user logs in, I set a "LoggedIn" session variable and then include a file at the top of every page that simply checks for this session variable and redirects to the login page if it doesn't exist. This stops people accessing any pages without first logging in and also solves your problem. Mise Le Meas,

Mighty :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top