Exemplo n.º 1
0
 private void Application_OnPostAuthenticateRequest(object sender, EventArgs e)
 {
     IPrincipal currentPrincipal = HttpContext.Current.User;
     if (currentPrincipal.Identity.IsAuthenticated)
     {
         FormsIdentity formsIdentity = (FormsIdentity)currentPrincipal.Identity;
         DMSIdentity identity = new DMSIdentity(formsIdentity.Ticket);
         DMSPrincipal principal = new DMSPrincipal(identity);
         HttpContext.Current.User = principal;
         Thread.CurrentPrincipal = principal;
     }
 }
Exemplo n.º 2
0
        private void Application_OnPostAuthenticateRequest(object sender, EventArgs e)
        {
            IPrincipal currentPrincipal = HttpContext.Current.User;

            if (currentPrincipal.Identity.IsAuthenticated)
            {
                FormsIdentity formsIdentity = (FormsIdentity)currentPrincipal.Identity;
                DMSIdentity   identity      = new DMSIdentity(formsIdentity.Ticket);
                DMSPrincipal  principal     = new DMSPrincipal(identity);
                HttpContext.Current.User = principal;
                Thread.CurrentPrincipal  = principal;
            }
        }