Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
i got this error

The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
Posted
Updated 30-May-12 0:02am
v2
Comments
Oshtri Deka 30-May-12 6:00am    
Can we get some code please?
sunandandutt 30-May-12 6:02am    
Please Elavorate your Question.
Prasad_Kulkarni 30-May-12 6:03am    
When?? how?? Please elaborate..
Rajesh Kariyavula 30-May-12 6:08am    
Information provided is too limited to answer. It would be useful if you provide some code

1 solution

You should have an entry in your config file that looks something like this:
XML
<add name="MyEntity" connectionString="metadata=res://*/DataAccess.EntityFramework.MyEntities.csdl|res://*/DataAccess.EntityFramework.CodeStashEntities.ssdl|res://*/DataAccess.EntityFramework.CodeStashEntities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=MyDataSource\SQLExpress;initial catalog=MyCatalog;Integrated Security=SSPI;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
Your entity framework connection in your code should use the name supplied at the start.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900