protected void Application_PostAuthenticateRequest(object sender, EventArgs e)
 {
     if (Request.IsAuthenticated)
     {
         var identity = new CustomIdentity(HttpContext.Current.User.Identity);
         var principal = new CustomPrincipal(identity);
         HttpContext.Current.User = principal;
     }
 }
 public CustomPrincipal(CustomIdentity identity)
 {
     Identity = identity;
 }