title: Connection string hell in .NET / LINQ-SQL / ASP.NET
body: <p>I have a web application that comprises the following:</p>
  
  <ul>
  <li>A web project (with a web.config file containing a connection string - but no data access code in the web project)</li>
  <li>A data access project that uses LINQ-SQL classes to provide entities to the web project UI (this project has a settings file and an app.config - both of which have connection strings)</li>
  </ul>
  
  <p>When I build and deploy, there is no settings file or app.config in the Bin directory with the data access .dll, but changing the connection string in the web.config file doesn't change the database accordingly - so the connection string must be compiled into the data access dll. </p>
  
  <p>What I need is one config file for my entire deployment - website, data access dlls, everything - that has one connection string which gets used. At the moment there appear to be multiple connection strings getting used or hardcoded all over the place. </p>
  
  <p>How do I best resolve this mess?</p>
  
  <p>Thanks for any help.</p>