RE: forms authentication automatic logout without timers?

From: ranganh (ranganh_at_discussions.microsoft.com)
Date: 06/30/04

  • Next message: Timo Erbach: "Re: CS0016"
    Date: Tue, 29 Jun 2004 22:09:01 -0700
    
    

    Dear Danny,

    In the Page_Load event of the page where you want to logout the users, put the following code:-

    if(User.Identity.IsAuthenticated)
    {
    FormsAuthentication.Signout();
    }

    this will automatically signout user's who are logged in.

    hope it helps.
    "Danny" wrote:

    > Hello,
    >
    > I have a web application that uses forms authentication. I have been asked to implement a feature that logs users out automatically if they navigate to a page outside of the secured portion of the web app. This request means that cookie timeouts won't work, it needs to be an instant thing - you leave the site -> the door gets locked on your way out even if you haven't explicitly logged out yourself.
    >
    > Does anyone know if this is possible?
    >
    > Regards,
    >
    > Danny


  • Next message: Timo Erbach: "Re: CS0016"