Help with Session Timeout Redirect(s)

liunx

Guest
I've read a number of articles about applying custom timeout redirection and there are a number of approaches that are recommended.

What I need is a solution that I can apply to where there are 3 possibilities of redirection on a session timeout. Here is the structure of my web:

Main Website
Store Website
Backend Management (which is a part of the Store Website)

If a session times out on the Main Website then I need to redirect back to the index.aspx page.

If a session times out in the store, I need to redirect the user back to the store main page (particularly if they are within the SSL and about to checkout).

If a session times out in the Backend Management, the user need to be redirected to the management login form.

What I'm looking for is something simple, yet stable, in which the user is automatically redirected to the appropriate page when a timeout occurs.

Any ideas for a good approach?Treat a session variable like a string. When the string has a length of 0 you would do the redirct. You would use an if statement and the len statement. The only way you can tell if it has timed out is when the user tries to visit another page. The only way you can get data back to the server in order to run another script would be something like a meta refresh... so they can be inactive on your page all night without a redirect. You can set a variable on page load of any one of those pages, just some arbitrary thing that you will not use to really identify them, then if they go to another page associated with that page you can check the session variable onload and run the len(session(variable)). Thats how I would go about doing this.
 
Back
Top