title: Database + Windows Authentication + Username/Password?
body: <p>I have always thought that in order to connect to SQL server using windows authentication with explicitly specified credentials, you must LogonUser, Impersonate, then connect.</p>
  
  <p>It seems to me that <a href="http://blogs.msdn.com/spike/archive/2008/11/14/connectionstrings-mixing-usernames-and-windows-authentication-who-goes-first.aspx" rel="noreferrer">this link</a> suggests that it's possible to connect to SQL server without all this hassle, simply by specifying "uid=...;pwd=..." in connection string. I tested this method just to be sure it doesn't work, and - lo and behold - it didn't. If that blog post wasn't on msdn.com, I would have just dismissed it as noob talk, but it is.</p>
  
  <p>Does anyone have an idea what am I missing?</p>
  
  <p><strong>EDIT1:</strong> Many respondents misunderstood what I was referring to. Here's a copy/paste of what I was talking about. It's <em>not</em> integrated SQL, nor it's an ASP.NET impersonation made by IIS:</p>
  
  <pre><code>string sql4 = String.Format(
     @"Data Source={0};Integrated Security=SSPI;uid=&lt;uid&gt;;pwd=&lt;pid&gt;", server);     
  // Database + Windows Authentication + Username/Password
  </code></pre>