Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Persisting FormsAuthentication Cookie

0 views
Skip to first unread message

George Durzi

unread,
Mar 6, 2003, 12:12:17 PM3/6/03
to
I referenced the following article to "Create GenericPrincipal Objects with
Forms Authentication" .
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/ht
ml/SecNetHT04.asp

Basically what I needed to do was manipulate the Authentication Cookie to
stuff some user-related data in it, specifically the user role.

Everything works great, except one small thing. I provide a "remember me"
checkbox on login. When I create the auth cookie during login, I set the
FormsAuthenticationTicket to persist based on the value of the checked check
box. When I redirect away from the login page, I also do this.

Response.Redirect(
FormsAuthentication.GetRedirectUrl(txtUserName.Value.Trim(),
chkPersist.Checked),
true);

The "remember me" feature doesn't work ever since I manipulated the
Application_AuthenticateRequest to decrypt the authentication cookie and
create a GenericPrincipal.

Any ideas? Thanks!


0 new messages