Session expiration and authentication

From: Marcio Kleemann (notavailable)
Date: 05/14/04


Date: Thu, 13 May 2004 16:58:46 -0700

I'm using FormsAuthentication for an asp.net app. I would like the user to
be re-authenticated (redirected to the login page) if there is not activity
after a certain period of time. So I'm using Session.Timeout to set a
timeout period, and on Session_End() I call FormsAuthentication.SignOut.

My main problem is that after SignOut, the re-authentication does not
occur - I can still access the pages of the app as if I'm still
authenticated. Another interesting thing is that in Session_End I also
called Session.Clear(), but when the page posts back it can still access the
values that were previously stored in session variables. It's as if the
session never expired and the variables did not get cleared. I have a
breakpoint on Session_End, so I know that those functions are being called.

I'm new to this, so I'm wondering what I might be doing wrong. I'd
appreciate pointing me in the right direction, or to articles that go over
this in more detail.

Thanks



Relevant Pages

  • Redirection with Cell Phone Browsers
    ... I have written an ASP.NET app that searches an XML database ... only now got the session variables to work as intended. ... the command control works as intended on browsers that access ...
    (microsoft.public.dotnet.framework.aspnet.mobile)
  • Re: How do you figure out how much memory a class is using?
    ... I have a Page base class for my app so what you are saying makes sense. ... >> Basically its an extension of the Encapsulate Downcast refactoring. ... >> Rather then have the DirectCast of Session variables scattered ... >> - Session Variable name is in a single location ...
    (microsoft.public.dotnet.languages.vb)
  • Re: AJAX not working when using Session variables.
    ... Can you please post the relevant code? ... the AJAX calls weren't updating the ... I found the only real difference between my application and the quick app ... Is there any way to get AJAX to work when using Session variables? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Session Variables...
    ... I am using Session variables in my ASP application. ... app is installed on a win2k advanced server from the client browser when the ... I have checked the IIS enable session state settings. ...
    (microsoft.public.inetserver.asp.general)
  • Re: Session Variables...
    ... > I am using Session variables in my ASP application. ... > app is installed on a win2k advanced server from the client browser when ... > app is accessed the session variable returns null inspite of a value being ... I have checked the IIS enable session state settings. ...
    (microsoft.public.inetserver.asp.general)