title: AuthCookie is set, still being redirected to login.aspx
body: <p>I'm setting up mixed mode authentication in a C# web app. I set the AuthCookie in the WindowsAuthentication website and then try to redirect to the FormsAuthentication website. I think the cookie is in the correct path and everything because Context.Request.IsAuthenticated is true. Unfortunately, I keep getting redirected to the login page of the FormsAuthentication website as if I haven't set the AuthCookie. What is going on?</p>
  
  <p>I'm not familiar with how authentication works in ASP.NET so please, explain it to me like I'm 5. Thanks, :)</p>
  
  <p>edit: Here is the event in the Global.asax of the WindowsAuth site that makes the cookie. This site currently resides in the path /authentication "under" the FormsAuth site.</p>
  
  <blockquote>
  <pre><code>void Application_PostAuthenticateRequest(Object sender, EventArgs e)
  {
      WindowsIdentity ident = WindowsIdentity.GetCurrent();
      WindowsPrincipal p = new WindowsPrincipal(ident);
      if (p.Identity.IsAuthenticated)
      {
          HttpCookie cookie = FormsAuthentication.GetAuthCookie(p.Identity.Name, false);
          FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(cookie.Value);
          // Store roles inside the Forms cookie.
          FormsAuthenticationTicket newTicket = new FormsAuthenticationTicket(
              ticket.Version, ticket.Name, ticket.IssueDate, ticket.Expiration,
              ticket.IsPersistent, "", ticket.CookiePath);
          string encTicket = FormsAuthentication.Encrypt(newTicket);
          Context.Response.Cookies.Add(new HttpCookie(".GWBTroubleTickets", encTicket));
      }
      Response.Redirect("/employee/home.aspx");
  }
  </code></pre>
  </blockquote>