I am trying to set a authetication request based on my ticket created in login.aspx but for some reason I getting an error the code is as follows
protected void Application_AuthenticateRequest(object sender, EventArgs e)
{
// Create an Identity object
FormsIdentity identity = (FormsIdentity)Context.User.Identity;
// When the ticket was created, the UserData property was assigned a
// pipe delimited string of role names.
string[] roles = identity.Ticket.UserData.Split(new char[] { ',' });
String userData = identity.Ticket.UserData;
// This principal will flow throughout the request.
GenericPrincipal principal = new GenericPrincipal(identity, roles);
// Attach the new principal object to the current HttpContext
}