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

Session Time Out

Status
Not open for further replies.

jino

Programmer
Apr 1, 2004
41
0
0
CA
Hi,

I am testing the session time out for my application. I put a breakpoint in the Session_End method to find out if the timeout expires. It does expire after the specified time (set to 2 minutes in the Web.Config file), but I am not able to redirect the user to another page using Response.Redirect . I have tried using both external links and links to aspx pages within the same solution.

Any ideas?

Thanks

Jino
 
Have you tried to use the Server.Transfer method?

Server.Transfer("AnotherPage.aspx")

Just a thought? I use it in my global.aspx pages to redirect the user to a custom error page.

George Oakes
Check out this awsome .Net Resource!
 
Hi,

I did try using the Server.Transfer method. Nothing happens. It stays in the same page as before. BTW, I am assuming the Server.Transfer or the Response.Redirect method is invoked from the Session_End method in Global.asax.

Any other ideas? Thanks in advance.

Jino
 
What's the point in redirecting the user when the session ends? They've probably already left so you can't redirect them. Instead, redirect them when they make a request to any page but a particular session variable doesn't exist.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Hi there,

The clients using this application might be entering sensitive data (personal and financial). They might leave the session open for the next user (this application is mostly for audiences using a public internet site like a library). So, I want to abandon the open session and present the introduction page so that the next person using will not see any data entered by the previous user.

That is why I need to be redirected to another page when the session expires. I need this to be done without requesting any other page. This has to be done automatically.

Another thing I thought of doing is closing up the browser.

any further ideas?

Thanks

Jino
 
What I mean by "What's the point in redirecting the user when the session ends" is that the user may have already left (i.e. they may have closed the browser) by the time the session ends so there is no way you can redirect them.

If you need the client's page to be changed without "requesting any other page" then you will have to use a client side language (i.e. javascript).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top