Re: asp and AD authentication

From: Jason Bentley (jbentley_at_urc.state.in.us.nostinkingspam)
Date: 03/05/04

  • Next message: Tibor Biro: "RE: How to automatically change from httpS to http for a specific folder??"
    Date: Fri, 5 Mar 2004 12:18:25 -0500
    
    

    If you are using Forms-based authentication and cookies, you could just kill
    the cookie.

    public static void LogOutUser(cookieName)
    {
        if (HttpContext.Current != null)
        {
            FormsAuthentication.SignOut();
            HttpContext.Current.Response.Cookies[cookieName].Expires =
    DateTime.Now;
            HttpContext.Current.Response.Cookies.Remove(cookieName);
        }
    }

    -or-

    You could just abandon the session:

    Session.Abandon();
    Response.Redirect("default.aspx");

    Jason Bentley

    "Blake" <blake_duffey@NOSPAM.hotmail.com> wrote in message
    news:upWX7UsAEHA.3024@TK2MSFTNGP10.phx.gbl...
    > I have no problems authenticating via AD and an ASP page. My question is
    > this - is there any way to 'reverse' the process?
    >
    > What I mean is the authenticated state remains as long as the browser
    window
    > is open. Is there any .asp command I can provide that will revert the
    > browser session back to IUSR?
    >
    > Thanks, as always.
    >
    > Blake
    >
    >


  • Next message: Tibor Biro: "RE: How to automatically change from httpS to http for a specific folder??"

    Relevant Pages

    • Re: Newbie question-- Perl pw authentication without pop-up prompt
      ... forgive me if this is the worng group ... This newsgroup does not exist. ... content but want to hook in to the authentication phase. ... After all this is precisely why cookies exist. ...
      (comp.lang.perl)
    • Re: how to pass authorization to another application
      ... The host application will authenticate the user, ... Your browser will not send authentication information from one server to another. ... Cookies are the same way - the browser will not under normal conditions pass a cookie meant for one host on to another. ...
      (comp.lang.php)
    • [.NET 1.1] Authentication and cookies clarifications
      ... I'm testing ASP.NET 1.1 authentications and cookies features, and I've red tons of tutorials and articles about this, but not all is clear for me. ... My goal is to create a basic site with authentication process, like my other ASP 3.0 sites that I developed with classical session variables to follow each user with some personal data. ... In .NET 1.1 I understand the basic web.config settings with <authentication> node and and so on... ... I've tested the global.asax "onauthenticationrequest" to cast an identities to principal for use "isInRole" properties, but this hint not solve the problem of save in temporary memory some other data for not access to database everytime, also I want to use a database table for storing my users data, also their role in this application. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Accessing cookies returned in error responses with httpwebrequest (.net CF)
      ... authentication using the NetworkCredential class, ... The problem is that the site uses cookies to track the user attempting ... HttpWebResponse object to poach them from. ...
      (microsoft.public.dotnet.framework.compactframework)
    • Re: Forms based security without cookies?
      ... original post that FormsBased authentication as written by MS HAS TO HAVE ... If you can't use cookies, you have to write your own. ... >> on the client machine? ... Forms based security looks like a perfect fit ...
      (microsoft.public.dotnet.framework.aspnet.security)