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.

Mike108
  • 2,089
  • 7
  • 34
  • 45
  • 1
    see this post http://stackoverflow.com/questions/6983732/ie10-user-agent-causes-asp-net-to-not-send-back-set-cookie-ie10-not-setting-coo – Jack0fshad0ws Mar 17 '13 at 19:12

1 Answers1

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.

ra00l
  • 570
  • 4
  • 20
  • The same code works in IIS7 with IE10, but doesnot work in IIS6 with IE10. – Mike108 Dec 27 '12 at 07:58
  • Out of ideas, sorry. Perhaps you can use Fiddler to investigate what's going on? – ra00l Dec 29 '12 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. –  Mar 08 '13 at 11:13