5

FormsAuthentication.SetAuthCookie doesnot work in IIS 6.0 when I use IE10 in Windows 7. I use Fiddler to monitor the cookie, and I found that in IIS 6.0 and IE10, it doesnot set the cookie.

Test case results:

  1. When I use FireFox and IIS 6.0 it works.
  2. When I use IE9 and IIS 6.0 it works.
  3. When I use IE10 compatible mode and IIS 6.0 it works.
  4. When I use IE10 and IIS 7.0 it works.
  5. When I use IE10 and IIS 6.0 it doesnot work.

The page code is simple:

    protected void Page_Load(object sender, EventArgs e)
    {
        System.Web.Security.FormsAuthentication.SetAuthCookie("Demo", false);

Thanks.

1

1 Answer 1

0

You auth cookie is set when your request reaches the client. Make sure you don't have any errors that could force the asp.net runtime to redirect to error page.

Also, a response.Redirect might cause issues.

3
  • The same code works in IIS7 with IE10, but doesnot work in IIS6 with IE10.
    – Mike108
    Dec 27, 2012 at 7:58
  • Out of ideas, sorry. Perhaps you can use Fiddler to investigate what's going on?
    – ra00l
    Dec 29, 2012 at 15:51
  • On my setup the difference is that IIS6 isn't sending back the .ASPXAUTH cookie on IE10. Firefox and Chrome are working fine.
    – user593806
    Mar 8, 2013 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.