"Grey" <er*******@i-cable.com> wrote in message
news:OR**************@TK2MSFTNGP10.phx.gbl...
I read from some site to learn the form authentication with AD that it
needs to create a FormsAuthenticationTicket to store the group list. I want to
that what is the function of FormsAuthenticationTicket?? is it a must to
create those ticket if I need to get the user's group list??? If I only
want to authenticate the username and password with AD, do I need to create the
FormsAuthenticationTicket???
Forms Authentication always creates a FormsAuthenticationTicket. The only
question is whether or not you create it manually and therefore can access
it yourself for your own purposes.
If you do nothing special, a FormsAuthenticationTicket is created with a
UserData property set to null. If you create one manually, you get the
opportunity to set UserData to a list of groups. You would then encrypt the
FormsAuthenticationTicket, and set the value of the forms authentication
cookie to the encrypted ticket.
Subsequently, on the next page request, your AuthenticateRequest handler in
global.asax will be able to get access to the decrypted
FormsAuthenticationTicket. This will give you access to your list of groups.
--
John Saunders
johnwsaundersiii at hotmail