title: Asp.NET Forms Based Autheticaiton Not Working in IE9 or 10
body: <p>I have two asp.net web form applications shared on a virtual server.  Everything was working great.  I had to move to a new virtual server with the same specs at a different vendor. </p>
  
  <p>The first web form application works great. </p>
  
  <p>The problem, the second web form application will not allow the user to be authenticated.  I am using asp.net forms based authentication.  For some reason it is not issuing the forms authentication ticket. I reran the project in my development environment and the authentication works great.</p>
  
  <p>I am not sure if IIS is configured incorrectly or if something else is setup incorrectly.  I have triple check the new server with the old server and all IIS settings appear to be identical.  I am using asp.net 4.0 and am using an IIS Host Header to differentiate requests between the two sites.</p>
  
  <p>After several hours of testing and research all I have been able to conclude is that the second website on the production server only fails to authenticate users in Internet Explorer 9 &amp; 10.  Every other browser works fine.  When run the website in compatibility mode in IE9 or 10, it also works.</p>
  
  <p><strong>Here is how I issue the Forms Authentication Ticket in Code:</strong></p>
  
  <pre><code>FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(
                  1, //Ticket Version
                  "", //Associated User Name
                  DateTime.Now, //Date/Time Issued
                  DateTime.Now.AddMinutes(60), //Time to expire
                  false, //Persistent Cookie
                  user_id, //User-Data --- User Role
                  FormsAuthentication.FormsCookiePath); // Cookie Path
  
          string hash = FormsAuthentication.Encrypt(ticket);
          HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, hash);
  
          if (ticket.IsPersistent)
          {
              cookie.Expires = ticket.Expiration;
          }
  
  
      //Add cookie to the list
      Response.Cookies.Add(cookie);
  </code></pre>
  
  <p><strong>Here is my authentication setup in my Web.Config file:</strong></p>
  
  <pre><code>&lt;authentication mode="Forms"&gt;
    &lt;forms loginUrl="Login.aspx" protection="All" timeout="90" path="/" name=".survey" requireSSL="false" slidingExpiration="true" defaultUrl="survey.aspx" cookieless="UseDeviceProfile" enableCrossAppRedirects="false"/&gt;
  &lt;/authentication&gt;
  &lt;authorization&gt;
    &lt;deny users="?"/&gt;
    &lt;allow roles="Standard, Admin"/&gt;
  &lt;/authorization&gt;
  </code></pre>
  
  <p>Here is the other thing.  The first web form application (the one that works) uses the same basic authentication code.  It works great on every browser.  The only difference between the two application's authentication is that the first application (the one that works) requires SSL.</p>
  
  <p>This is by far the most unique error I have ever encountered.  Please let me know if you have any advice or if I can provide you with any further details.</p>
  
  <p>Thanks for your help.</p>