title: ASP.NET MVC: problem connecting to a database
body: <p>I am using this guide:
  <a href="http://www.asp.net/mvc/tutorials/mvc-music-store-part-7" rel="nofollow">http://www.asp.net/mvc/tutorials/mvc-music-store-part-7</a></p>
  
  <p>Like instructed, I entered to <code>ASP.NET Web Application Administrator</code>, but when I enter the security tab:</p>
  
  <blockquote>
    <p>There is a problem with your selected
    data store. This can be caused by an
    invalid server name or credentials, or
    by insufficient permission. It can
    also be caused by the role manager
    feature not being enabled. Click the
    button below to be redirected to a
    page where you can choose a new data
    store.</p>
    
    <p>The following message may help in
    diagnosing the problem: <strong>Unable to
    connect to SQL Server database</strong>.</p>
  </blockquote>
  
  <p>I did clicked the button below, but it didn't help at all.</p>
  
  <p>So far I did exactly (I think..) like the guide said I should.
  I have a terrible feeling that the answer is obvious. </p>
  
  <p><strong>Edit 1:</strong>
  BTW, When I open the full solution from the guide and try to open the <code>ASP.NET Web Application Administrator</code>, the following error shows up:</p>
  
  <blockquote>
    <p>There is a problem with your selected
    data store. This can be caused by an
    invalid server name or credentials, or
    by insufficient permission. It can
    also be caused by the role manager
    feature not being enabled. Click the
    button below to be redirected to a
    page where you can choose a new data
    store.</p>
    
    <p>The following message may help in
    diagnosing the problem: A
    network-related or instance-specific
    error occurred while establishing a
    connection to SQL Server. The server
    was not found or was not accessible.
    Verify that the instance name is
    correct and that SQL Server is
    configured to allow remote
    connections. (provider: SQL Network
    Interfaces, error: 26 - Error Locating
    Server/Instance Specified)</p>
  </blockquote>
  
  <p><strong>Edit 2:</strong>
  Connection String:</p>
  
  <pre><code>&lt;connectionStrings&gt;
      &lt;add name="MusicStoreEntities"
       connectionString="Data Source=|DataDirectory|MvcMusicStore.sdf"
       providerName="System.Data.SqlServerCe.4.0"/&gt;
    &lt;/connectionStrings&gt;
  </code></pre>