title: Connection String in web.config fails to connect
body: <p>I decided to transfer my project from work to home and I am having some trouble with the connection to the database. This one works on work:</p>
  
  <p>web.config:</p>
  
  <pre><code>  &lt;connectionStrings&gt;
      &lt;add name="ApplicationServices" connectionString="Data Source=XXXXXX\SQLSERVER2008;Persist Security Info=true;Initial Catalog=esResearch;User ID=XXXXXX; Password=XXXXXX"
          providerName="System.Data.SqlClient" /&gt;
      &lt;add name="esResearchConnectionString" connectionString="Data Source=XXXXXX\SQLSERVER2008;Initial Catalog=esResearch;Persist Security Info=True;User ID=XXXXXX;Password=XXXXXX"
          providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>app.config:</p>
  
  <pre><code>&lt;connectionStrings&gt;
      &lt;add name="esResearchModels.Properties.Settings.esResearchConnectionString"
          connectionString="Data Source=XXXXXX\SQLSERVER2008;Initial Catalog=esResearch;Persist Security Info=True;User ID=XXXXXX"
          providerName="System.Data.SqlClient" /&gt;
      &lt;add name="esResearchModels.Properties.Settings.esResearchConnectionString1"
          connectionString="Data Source=XXXXXX\SQLSERVER2008;Initial Catalog=esResearch;Persist Security Info=True;User ID=XXXXXX;Password=XXXXXX"
          providerName="System.Data.SqlClient" /&gt;
      &lt;add name="esResearchModels.Properties.Settings.esResearchConnectionString2"
          connectionString="Data Source=XXXXXX\SQLSERVER2008;Initial Catalog=esResearch;User ID=XXXXXX;Password=XXXXXX"
          providerName="System.Data.SqlClient" /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>I guess I do not need all those strings but it works atleast. And this line is used in designer.cs</p>
  
  <pre><code>base(global::esResearchModels.Properties.Settings.Default.esResearchConnectionString2, mappingSource)
  </code></pre>
  
  <p>I have done the movie sample project on asp.net/mvc and used this connectionstring and this one works on my computer at home.</p>
  
  <p>Web.config:</p>
  
  <pre><code>  &lt;connectionStrings&gt;
      &lt;add name="ApplicationServices"
           connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
           providerName="System.Data.SqlClient" /&gt;
  
      &lt;add name="MovieDBContext"
          connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;database=Movies;User ID=sa;password=" 
           providerName="System.Data.SqlClient"/&gt;
    &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>Any ideas?</p>