Re: Questions About Session Timeout

Tech-Archive recommends: Fix windows errors by optimizing your registry



I have an asp.net 2.0 app written in C# and VS2005. I sometimes have
issues where users leave a page onscreen and then come back to it a
few hours later and try to continue working. Of course, it doesn't
work then. Currently they will encounter some sort of error message
because the session has timed out.

I need to develop a way to handle this!

Some questions:


2) When I am using my online banking website, my webpage automatically
logs me out after a set amount of time. How do I do that with my code?

Thanks in advance for your help!


You can have a javascript timer in your html page, that redirects to some
"session expired" page after the session should have timed out. Just be careful: the session timeout is in minutes and javascript
works in milliseconds.
It's not possible to wire up some "SessionEnd" event to redirect the browser anywhere, as that event happens on the server long after the last request has been served.

Hans Kesting


.



Relevant Pages