title: Linq to SQL Connection String for Sql Auth
body: <p>tI'm using Sql Server with Windows Authentication enabled. Recently I added a dropdown to allow for different connections. One of them uses SQL Authentication.</p>
  
  <p>I consulted msdn and it seems all I need to do is add a Username and Password entry to my string.</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/aa905872(v=sql.80).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/aa905872(v=sql.80).aspx</a></p>
  
  <p>My windows authentication string : </p>
  
  <pre><code>Data Source=PC\Slike;Initial Catalog=db_slike_articles;Integrated Security=True
  </code></pre>
  
  <p>The second string I added for SQL Authentication :</p>
  
  <pre><code>Data Source=Data Source=PC\Dev;Initial Catalog=db_dev_articles;Integrated Security=True;User ID=root;Password=rootpwd
  </code></pre>
  
  <p>For some reason when I choose the 2nd SQL connection it's throwing an SqlException that login failed with my PC\Slike username. The connection string is the second one with the User ID and Pwd, I don't understand why it's trying to connect against my local account.</p>
  
  <p>The second string is located on a remote machine, is there something I have to enable to switch from Windows Auth to Sql Auth or does specifying the the credentials within the string is enough?</p>
  
  <p>Thanks</p>