Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7050843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:11:35+00:00 2026-05-28T03:11:35+00:00

I have the MvcMovie project and have simply aadded a connection string to get

  • 0

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.

I get the error.

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)”}

All I have added to the project is
1. a connection string.

<connectionStrings>
    <add name="ArticleDB" connectionString="Data Source=Home-PC\SqlServer2008;initial catalog=DairyPump3;integrated security=SSPI" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  1. A class called Article

    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<Article> Articles { get; set; }
    }
    
  2. A ArticlesController referencing EF etc

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.

I have googled this and many people have encountered the issue, but their solutions do not seem to address this.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:11:36+00:00Added an answer on May 28, 2026 at 3:11 am

    The constructor overload you’re using is to specify the connection string (“Data source=…”) or the database name at the default SQL instance (e.g. “Initial Catalog=ArticleDb“).

    If you name your connection string to ArticleDBContext (or your context to ArticleDB), it should use the connection string you’ve specified, and you don’t need the constructor either.

    Note: I did a quick confirmation of this using EF CF with migrations. When I used : base("foo") I saw a new database named foo come up on .\SQLEXPRESS (the default instance used by EF). My observations also seem to be confirmed here.

    [edit:] Also worth pointing out: when I used the constructor (with : base("foo)"), it overrode the settings I had in web.config. Probably not something you want to do if you’re deploying to a server where you need to configure the connection string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have added the following code to my SQL query: (Note cut down version) DECLARE
Have you ever seen any of there error messages? -- SQL Server 2000 Could
have written this little class, which generates a UUID every time an object of
Have a bunch of WCF REST services hosted on Azure that access a SQL
Have been following Rails Tutorial by Michael Hart rails version 3.0 on mac OS
Have a simple contact us XPage created. Have server side validation in place that
Have a look at this HTML code: <div class=overlay> <a href=#>1</a> <a href=#>1</a> <a
Have a table called person. which has personid and contactid. if a person is
Have a xml string, goal is to replace an xml element value to a
have an an array String classname[]={'a','b','c','d'}; ArrayAdapter<CharSequence> adapterClasses = new ArrayAdapter<CharSequence>( getApplicationContext(), R.layout.spinner_item_class, R.id.spinnerclasstxt,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.