title: How to run a Selenium NUnit test using Windows Authentication with Firefox?
body: <p>Our web app requires Windows Authentication. I have a NUnit test that</p>
  
  <ol>
  <li>Launches a IIS Express process hosting my web app.</li>
  <li>Starts up a <code>FirefoxDriver</code> and navigates to the web app.</li>
  </ol>
  
  <p>Unforntunately it gets a <code>401.0 - Unauthorized</code> error without even asking for credentials. I'm used to Firefox asking for credentials in which case you can add</p>
  
  <pre><code>        profile.SetPreference("network.ntlm.send-lm-response", true);
          profile.SetPreference("network.automatic-ntlm-auth.trusted-uris", "localhost");
  </code></pre>
  
  <p>but for some reason, I just get a 401 right away with <strong>Logon User</strong>: <em>Anonymous</em>.</p>
  
  <p>How can I tell Selenium/Firefox to use integrated security? Looking at the Windows Task Manager, I see that the Firefox process is started "as me".</p>