The specified named connection is either not found in the configuration, not intended to be Used wit

Source: Internet
Author: User

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

Either the specified named connection is not found in the configuration and is not intended for use by entityclientProgram, Or is not valid

 

Solution:

I suspect that your issue Is Coming From The fact that you have more than one project In Your solution and the one that contains your Entity Framework stuff including edmx files Is Not the solutions ' S startup project. in this case even if the connection string exists in the EF app. config project, still CLR cannot find it at runtime. for example if you have a web site and a ef project in your solution, you need to copy the connection string from the EF Project  ' S app. config to your website '  S web. config. basically any connection string data shocould be exist in the config file of the project that. net threads initiated from by CLR (I. e. your startup project ). if this is not your case, then just open your edmx file, right click on its surface, select Properties and copy the connection string and paste it into your app. config connection string section. this way you can make sure that you are having the correct one in your Config. 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.