title: Shared connection string between multiple projects
body: <p>I have multiple projects being hosted in IIS. These all share a database, which is called using EF6. I want to be able to use a shared connection string config file which I can reference from each of the other projects' web.config. This way, I'm able to manage any chances to the connection string from a single location. From what I've found online, I'm trying to accomplish this through a Virtual Directory and the configSource attribute for the connectionString. </p>
  
  <p>IIS structure</p>
  
  <p>-VirtualDirectory (mapped to /DbConfigFile)<br>
  -WebApp 1<br>
  -WebApp 2<br>
  -WebApp 3  </p>
  
  <p>WebApps' Web.config connectionString sections<br>
      <code>&lt;connectionStrings configSource="/DbConfigFile/testDB.config"&gt;&lt;/connectionStrings&gt;</code></p>
  
  <p>The external config file (testDB.config) containing the connectionString needed by all applications.
      <code>&lt;connectionStrings&gt;
      &lt;add name="TestDBEntities" connectionString="metadata=res://*/TestDB.csdl|res://*/TestDB.ssdl|res://*/TestDB.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=TestDB;initial catalog=VBODashboard;persist security info=True;user id=Test;password=Test;MultipleActiveResultSets=True;App=EntityFramework&amp;quot;" 
  providerName="System.Data.EntityClient" /&gt;
  &lt;/connectionStrings&gt;</code></p>
  
  <p>I've tried various paths in the configSource attribute with no luck (~/DbConfigFile/testDB.config, testDB.config). How would I access this file? Or is there a better way to accomplish this?</p>