On 7/28/2004 10:43 AM, mircu wrote:
Hi,
I need a quick solution to make my application behave correctly when one
of these timeouts occurs. I have some logic in session_start but when
the authentication cookie timeouts the user is redirected to login page
and after successful login the session is not started. I'd like to have
one timeout and when it occurs the user must login and then the new
session is started. TIA.
Regards,
mircu
You have to watch out for when auth is OK, but session expires. This is
the really tricky situation. To check, just create a Session var of
your own when the session starts:
Session("tester ") = 1
Then always test (on every page) whether that var is equal to 1; if not,
then you know the session is timed out, if needed, log them out of forms
auth and they have to login again.
If auth timeout happens first (or perhaps when they are for some reason
redirected to the login page), just Abandon the session, since it seems
you want to restart it with their login.
Also, if possible, set the timeouts for each to the same values (auth
and session timeouts) to help alleviate the chance of this.....
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET