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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic redirect when session times out

Status
Not open for further replies.

hondaman2003

Programmer
Mar 3, 2008
202
US
I would like to redirect automatically to a 'timeout.aspx' page when the session expires. I am using 'stateserver' and cannot change to 'InProc'. I understand that the Session_End does not fire. The situation I would like to handle is when someone is logged into the website and walks away from their computer, I would like to have the page automatically redirected to a timeout page explaining what happened. They will then click a link that will bring them back to the log in page.

I have explored several different options. The first was to consider client side java script that would redirect after a period of inactivity and the 'timeout.aspx' page would dispose of any potential session that may still exist. I don't like that because there are a lot of pages that will need to be changed.

I have also explored this link:
Link

The problem I have is I am using VB.NET and this code is in C#. That is fine most of the time as I can translate but when modifying the Application_Start with 'SessionEndModule' I get that it is not defined. I have researched and can find no solution to this.

Can anyone help me with any solution to this problem of automatically redirecting to a different page when the session times out?
 

You'd have to use a transparant AJAX method to ping the server to view the state of the session without resetting it. I've seen it discussed here although I've never used it.



Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach
 
That looks like a really great solution except it appears as if I would need to implement it on every page, does that sound correct?
 

..or a Master page


Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top