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 8995121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:34:39+00:00 2026-06-15T23:34:39+00:00

I am facing a problem in a windows forms application (.net 4.0) using entity

  • 0

I am facing a problem in a windows forms application (.net 4.0) using entity framework 5.

I have a DbContext instance as a class field in a form like this:

protected MascoteAquariumEF model = new MascoteAquariumEF("name=MascoteAquariumEF");

here is my connection string:

<connectionStrings>
   <add name="MascoteAquariumEF" 
     connectionString="metadata=res://*/MascoteAquariumDBContext.csdl|res://*/MascoteAquariumDBContext.ssdl|res://*/MascoteAquariumDBContext.msl;provider=System.Data.SqlClient;provider connection string='data source=vm_visual_stdo\sqlexpress2008;initial catalog=MascoteAquarium;integrated security=True;multipleactiveresultsets=True;App=EntityFramework'" 
     providerName="System.Data.EntityClient" />
</connectionStrings>

And in the designer I am seeing this error:
The form don’t get really designed….but running the project its ok (no error)

The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.

any idea??

  • 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-06-15T23:34:39+00:00Added an answer on June 15, 2026 at 11:34 pm

    Try to pass name value only:

    protected MascoteAquariumEF model = new MascoteAquariumEF("MascoteAquariumEF");
    

    Also I think it’s better to check if form in designer before instantiating your context:

    protected MascoteAquariumEF model;
    
    public YourForm()
    {
        InitializeComponent();
    
        if (DesignMode)
            return; // you don't need to create context
    
        model = new MascoteAquariumEF("MascoteAquariumEF");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a Windows Form Application using Visual C# 2008 Express Edition with
I have created a Windows Forms C# application. But I am facing problems in
I have a Windows Forms form in C#. It is just like a regular
In my application I have one windows form application and two windows services. Currently
I'm facing the next problem in MinGW shell under windows. I have in my
I'm facing a weird problem with the Safari browser for Windows. I have an
I'm facing this problem in Windows 7. First I define a class which implements
I am facing problem with an Oracle Query in a .net 2.0 based windows
We are facing one problem with DownloadStringCompleted method always returning same result in windows
I am facing problem to get variable from query string. I have used htaccess

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.