title: MVC 3 connection string to Sql Server 2008 R2 cannot connect
body: <p>I have the MvcMovie project and have simply aadded a connection string to get to my Sql Server 2008 R2 version for a class called Articles.</p>
  
  <p>I get the error.</p>
  
  <blockquote>
    <p>The provider did not return a ProviderManifestToken string. Inner
    Exception: {"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: Shared Memory Provider, error: 40 - Could not open a
    connection to SQL Server)"}</p>
  </blockquote>
  
  <p>All I have added to the project is 
  1. a connection string.</p>
  
  <pre><code>&lt;connectionStrings&gt;
      &lt;add name="ArticleDB" connectionString="Data Source=Home-PC\SqlServer2008;initial catalog=DairyPump3;integrated security=SSPI" providerName="System.Data.SqlClient"/&gt;
    &lt;/connectionStrings&gt;
  </code></pre>
  
  <ol>
  <li><p>A class called Article</p>
  
  <pre><code>public class Article
  {
      public int ID { get; set; }
      public string Menu { get; set; }
      public string Page { get; set; }
      //public DateTime ReleaseDate { get; set; }
      public string Content { get; set; }
      //public decimal Price { get; set; }
  }
  
  public class ArticleDBContext : DbContext
  {
      public ArticleDBContext() : base("ArticleDB") { }
  
      public DbSet&lt;Article&gt; Articles { get; set; }
  }
  </code></pre></li>
  <li><p>A ArticlesController referencing EF etc</p></li>
  </ol>
  
  <p>I have Sql Server tcp and pipes enabled etc, and I allow remote connections. I have tried with creating the db first and then deleting it - but no difference.
  I am not using Code First to my knowledge - at least I do not want to use code first.
  The app runs for the MvcMusic side but the config file has no connection string for this - I don't know where it stores the music data.</p>
  
  <p>I have googled this and many people have encountered the issue, but their solutions do not seem to address this.</p>
  
  <p>Thanks</p>