N
news.microsoft.com
I have a small ASPX app I have created and decided to roll my own Forms
Authentication. Now I take the user name, password and domain and created an
encrypted foms authentication ticket. In the ticket I put some info in the
userdata property. On a different page after authetication I want to accsess
that field. I found a couple of examples, one is like
lblLogin.Text = ((FormsIdentity)User.Identity).Ticket.UserData;
This throws an exception saying cast is not valid. I've looked at this where
the GenericPrincipal is created in the Globalasax file and I can see the
string data in the UserData, does anyone have any idea?
Authentication. Now I take the user name, password and domain and created an
encrypted foms authentication ticket. In the ticket I put some info in the
userdata property. On a different page after authetication I want to accsess
that field. I found a couple of examples, one is like
lblLogin.Text = ((FormsIdentity)User.Identity).Ticket.UserData;
This throws an exception saying cast is not valid. I've looked at this where
the GenericPrincipal is created in the Globalasax file and I can see the
string data in the UserData, does anyone have any idea?