protected void Application_AuthenticateRequest(object sender, EventArgs e)
 {
     IPrincipal principal = HttpContext.Current.User;
     if (principal != null && principal.Identity.IsAuthenticated && principal.Identity.AuthenticationType == "Forms")
     {
         //2. IDENTITY
         FormsIdentity fIndent = (FormsIdentity)principal.Identity;
         AOIdentity cIndent = new AOIdentity(fIndent.Ticket);
         AOPrincipal nPrincipal = new AOPrincipal(cIndent);
         HttpContext.Current.User = nPrincipal;
         Thread.CurrentPrincipal = nPrincipal;
     }
 }
 public AOPrincipal(AOIdentity cIndent)
 {
     this.Identity = cIndent;
 }