Forms Authentication: Storing UserData in the "FormsCookieName" Cookie

From: John Saunders (jws@jws.ultranet.com)
Date: 08/22/02


From: "John Saunders" <jws@jws.ultranet.com>
Date: Thu, 22 Aug 2002 11:32:06 -0400


I've seen several examples of code that creates a separate cookie in the
AuthenticateRequest event in order to store user data such as a list of
roles. Many of these examples even use a FormsAuthenticationTicket and store
the data in the UserData property of the new ticket.

But is there a way to store such data in the UserData property of the ticket
that's actually used by Forms Authentication? If one sets ((FormsIdentity)
User.Identity).Ticket.UserData, does the updated ticket get sent back to the
client's browser in an updated cookie? I haven't seen this documented
anywhere.

Thanks,
John Saunders
johnwsaundersiii@hotmail.com



Relevant Pages