I am using vs2010 MVC project structure. However I am getting below error while creating object of entity model
"The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid."
I have defined connection string in app.config as well in web.config also.
<add name="CmdEntity" connectionString="metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;provider=System.Data.SqlClient;provider connection string='Data Source=mapdata;Initial Catalog=user1;User ID=user123;Password=user213;MultipleActiveResultSets=True'"
My project structure is as below. All below are different solutions.
->DAL - here my Entity.edmx is defined.
->ClassLibrary-here I am defining my object and calling entity model.
->Web - UI forms
Please refer to the following threads which contain some solutions for this error to see whether they could solve yours.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?