protected void Application_AuthenticateRequest(object sender, EventArgs e) { if (HttpContext.Current.User != null) { cookie (ticket) exists for this user if (HttpContext.Current.User.Identity.IsAuthenticated) { FormsAuthentication if (HttpContext.Current.User.Identity is FormsIdentity) { FormsIdentity identity = (FormsIdentity)HttpContext.Current.User.Identity; FormsAuthenticationTicket ticket = identity.Ticket; string[] roles = ticket.UserData.Split(','); HttpContext.Current.User = new System.Security.Principal.GenericPrincipal(identity, roles); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)