title: How to get an ASP.NET MVC 3.0 site to use a db other than the default SQLEXPRESS
body: <p>essentially what I'm trying to do is get my head around Microsoft's ASP.NET MVC 3.0. I'm using Visual Studio 2010 Ultimate. I followed the video tutorial at <a href="http://www.asp.net/mvc/videos/5-minute-introduction-to-aspnet-mvc" rel="nofollow">http://www.asp.net/mvc/videos/5-minute-introduction-to-aspnet-mvc</a> which got me up and running and as a result have created a website which accesses a local database.</p>
  
  <p>Question 1:</p>
  
  <p>Does anyone know where that local database is? I believe it's using a default SQLEXPRESS db somewhere. It doesn't show up in Server Explorer, it's not in the App_Data folder. I cant find it in any folder anywhere.  It was - as I understand it - generated automatically using a model from the project and nowhere does it tell me where it's put it.</p>
  
  <p>Question 2:</p>
  
  <p>What I'd really like to do is put the project online to play about with, and I've done that already by way of AppHarbor.com. They let you create a MS SQL Server database and give you a replacement connection string to bung in Web.config, but having replaced the connection string and rebuilt the solution - even after adding the AppHarbor database (I'm pretty sure pointlessly) to Server Explorer, my site still uses the elusive SQLEXPRESS database which I cant find.</p>
  
  <p>The change I made in Web.config was from:</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;/connectionStrings&gt;
  </code></pre>
  
  <p>To the format</p>
  
  <pre><code>&lt;connectionStrings&gt;
      &lt;add name="TestDB"
           connectionString="Server=SERVER;Database=DBNAME;User ID=USERID;Password=DBPASSWORD;" /&gt;         
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>Question one would be nice to know, but it's question 2 that's really bothering me. What reference to the database have I missed that is causing it to use a database that I don't want it to and know nothing about? I figure that there must be one, not least because when I remove the connection string completely from Web.config the thing still runs along fine.</p>
  
  <p>Any help would be greatly appreciated.</p>