Re: Persist login does not work
From: Svein Terje Gaup (stgaup_at_broadpark.no.spam)
Date: 05/23/04
- Next message: Svein Terje Gaup: "Re: Persist login does not work"
- Previous message: Eric Marvets: "Re: Check Current User is a Domaingroup member"
- In reply to: Eric Marvets: "Re: Persist login does not work"
- Next in thread: Svein Terje Gaup: "Re: Persist login does not work"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 23 May 2004 21:36:11 +0200
Superb! That was just what my code needed. Thanks!
Sincerely
Svein Terje Gaup
"Eric Marvets" <ericm@bangproject.com> wrote in message
news:O%23FgXoPQEHA.2520@TK2MSFTNGP11.phx.gbl...
> Do this:
>
> <existing code>
>
> // Create a cookie and add the encrypted ticket to the cookie as data.
> HttpCookie authCookie = new
HttpCookie(FormsAuthentication.FormsCookieName,
> encryptedTicket);
>
> </existing code>
>
> <add>
>
> authCookie.Expires = DateTime.Now.AddMinutes(60);
>
> </add>
>
> <existing code>
>
> // Add the cookie to the outgoing cookies collection.
> Response.Cookies.Add(authCookie);
>
> </existing code>
>
> Then in the Application_AuthenticateRequest event, after you finish
> extracting the roles, reset the exipration of the Cookie and replace it in
> the Response.
>
>
> --
> Eric Marvets
> Principal Consultant
>
> the bang project
>
> <shameless self promotion>
>
> Email sales@bangproject.com for Information on Our Architecture and
> Mentoring Services
>
> </shameless self promotion>
>
>
- Next message: Svein Terje Gaup: "Re: Persist login does not work"
- Previous message: Eric Marvets: "Re: Check Current User is a Domaingroup member"
- In reply to: Eric Marvets: "Re: Persist login does not work"
- Next in thread: Svein Terje Gaup: "Re: Persist login does not work"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]