KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
This is my Global.asax.cs file: public class MvcApplication : System.Web.HttpApplication { public static void RegisterRoutes(RouteCollection routes) { ... } protected void Application_Start() { this.PostAuthenticateRequest += new EventHandler(MvcApplication_PostAuthenticateRequest); } // This method never called by requests... protected void MvcApplication_PostAuthenticateRequest(object sender, EventArgs e) { HttpCookie authCookie = Request.Cookies[FormsAuthentication.FormsCookieName]; if (authCookie != null) { FormsAuthenticationTicket authTicket = FormsAuthentication.Decrypt(authCookie.Value); var identity = new GenericIdentity(authTicket.Name, "Forms"); var principal = new GenericPrincipal(identity, new string[] { }); Context.User = principal; } } } When PostAuthenticateRequest gets execute?
Tags (comma-separated)
Save Edits
Cancel