Author: Angry ASP.net Nerd | Posted on: 4/1/2010 5:06:13 PM | Views : 290

So I watched the video on adding custom data to the authentication ticket by Joe Stagner.
In the video Joe is placing this peace of code in the Page_Load method of the Default.aspx page:

if (Request.IsAuthenticated) { FormsIdentity ident = (FormsIdentity)User.Identity; if (ident != null) { FormsAuthenticationTicket ticket = ident.Ticket; string userDataString = ticket.UserData; LabelMsg.Text = userDataString; } } So the idea is to grab the authentication ticket and then grab the UserData value that was added when the user was authenticated.
Well, I get the User in User.Identity (in the code) underlined with the message "The name 'User' does not exist in the current context".
I searched the web a ...

Go to the complete details ...