title: Unable to open database file after changing connection string, SQLite, Visual Studio
body: <p>I have a ASP.NET MVC solution with 2 projects: DAL and web project.
  I used to connect to my SQLite database using local file path in connection string of both projects' web.config files:</p>
  
  <p>Web.configs of DAL and Web projects:</p>
  
  <pre><code>&lt;add name="DBEntities" connectionString="metadata=res://*/Models.Model.csdl|res://*/Models.Model.ssdl|res://*/Models.Model.msl;
  provider=System.Data.SQLite;
  provider connection string='data source=&amp;quot;C:\Users\Admin\Documents\Visual Studio 2013\Projects\Myproj\Myproj.db3&amp;quot;'" 
  providerName="System.Data.EntityClient" /&gt;
  </code></pre>
  
  <p>Everything was working fine, and then I needed to change connection string using <code>DataDirectory</code>, so that I could correctly deploy the website. I added the db file into <code>App_Data</code> folder of <strong>WEB project</strong> and both web.configs changed to:</p>
  
  <pre><code>&lt;add name="DBEntities"
  connectionString="metadata=res://*/Models.Model.csdl|res://*/Models.Model.ssdl|res://*/Models.Model.msl;
      provider=System.Data.SQLite;
      provider connection string='data source=&amp;quot;|DataDirectory|\Myproj.db3&amp;quot;'" 
      providerName="System.Data.EntityClient" /&gt;
  </code></pre>
  
  <p>Now, I can connect to the db extract data via code, but I cannot open database in server explorer and use designer, the error is: "Unable to open database file".</p>
  
  <p>I would appreciate any help!</p>