title: Most Strange IIS Windows Authentication behavior
body: <p>I have an ASP.NET website running on Windows Server R2 in a corporate network, using Windows Authentication. </p>
  
  <ul>
  <li>The app pool of the website is using a domain account and in Integrated pipeline mode.</li>
  <li>The authentication is set Windows Authentication, all other authentication modes are disabled.</li>
  </ul>
  
  <p>However, this does not work. Every time I access the website, it pops up a dialog asking for user name and password. I enter the correctly domain user name and password, but it does not continue--the windows pops up again. After three times, it fails and displays a white page. I tried with many different browsers, bu all of them fail. I asked some colleagues to try and they all got failure, too. </p>
  
  <p>I cannot figure out why this error is happening and tried many ways to fix it with no luck. I think it is very strange. However, finally I found a way to fix this problem, this is the most strange part of the problem: I edit the "Physical path" in "Basic Settings" of the website, I just point it to another healthy website, for instance, %SystemDrive%\inetpub\wwwroot, then I try to browse the website, very good, it runs well and displays the default page (iisstart.htm). It looks like it is not very helpful, but then I change the physical path back to my website; suddenly everything goes well -- the windows authentication works! I do not know why it helps, but I am happy with this result -- it fixes my problem though I do not know what the heck is happening.</p>
  
  <p>The happy time is always short, several days later, the server got some patches and restarted, the website can't work again. And again, I can fix the problem using the trick above.</p>
  
  <p>I do not like this! I do not like doing this stupid trick every time IIS resets or the server restarts. </p>
  
  <p>Is there anyone who has some ideas on why windows authentication fails, and why the aforementioned trick can fix it, and why after an IIS reset it fails again?</p>