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

    Question

  • 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'"
    
    
    
      providerName="System.Data.EntityClient" />
    
    
    
    

    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

    Monday, August 23, 2010 9:01 PM

Answers