forms authentication cookie not timeout
From: Daniel Jin (DanielJin_at_discussions.microsoft.com)
Date: 11/29/04
- Next message: Hernan de Lahitte: "Re: forms authentication question"
- Previous message: Richard: "Re: Deligation issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 29 Nov 2004 07:01:06 -0800
I customized the cookie generation in forms authentication so I can keep
extra data in the cookie. but the problem now is that my forms
authentication cookie no longer times out. anybody knows what's going on?
the following is my code that creates the cookie.
string[] roleList = <custom method to get roles>;
string userData = String.Join( ";", roleList );
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(
1, userName, issueDate, issueDate.AddMinutes(1), false, userData,
FormsAuthentication.FormsCookiePath );
string encryptedTicket = FormsAuthentication.Encrypt( ticket );
HttpCookie cookie = new HttpCookie( FormsAuthentication.FormsCookieName,
encryptedTicket );
Response.Cookies.Add( cookie );
Response.Redirect( FormsAuthentication.GetRedirectUrl( userName, false ) );
- Next message: Hernan de Lahitte: "Re: forms authentication question"
- Previous message: Richard: "Re: Deligation issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|