Ask Paula!

...bringing you notes from the field...
posts - 117 , comments - 87 , trackbacks - 0

My Links

News

Copyright © 2008-2014 Paula DiTallo

Tag Cloud

Article Categories

Archives

Post Categories

Image Galleries

.NET Development

Enterprise Integration

Entertainment - Games

Java Development

Mobile/PDA Development

Professional Affiliations

Why do I get the error: Specified Named Connection is either not found in the configuration for the EntityClient Provider?

The chances are pretty high that you are creating a multi-tiered application with a solution that may be calling several different projects, one of which is the ADO.NET Entity Framework DAO-layer. In order for the entity frame work to work outside the immediate project that its been created under, you'll have to import the connection string built by the EF wizard at create time to your other project's application or web config file.

Here's an example.  I have two projects under a single solution, 1 project is a test driver console app called RetroCar.Test.EF.  This project depends on a data access layer project called: RetroCarEntityFramework.  Even though RetroCar.Test.EF is just a simple unit test console app without an obvious need for a config file, I still need to import the connection string used in RetroCarEntityFramework in order for the test driver application not to bomb out.  The best way to do this is just go to the project RetroCar.Test.EF and add a new application config file item, then cut and paste the connection string from RetroCarEntityFramework into that. Recompile. This should fix the trouble.

If your woes drill down in the trenches of EF further, check out this thread on the topic:

http://social.msdn.microsoft.com/Forums/en/adodotnetentityframework/thread/f5904b4d-b2f8-421e-90de-339f93959533

Print | posted on Tuesday, June 14, 2011 4:22 PM | Filed Under [ Practical Answers .NET ]

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 
 

Powered by: