0

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

I have a working console project. However when I tried to copy the exe and the app.config (same folder) to a live server it didn't work and got the following error. Could it be a domain issue, or some setting that's baked in? I'm pretty sure it has access to databases since I have used other projects except this time is different because I chose edmx.

<connectionStrings>
<add name="AdvWorksEntities" connectionString="metadata=res://*/GroupsModel.csdl|res: //*/GroupsModel.ssdl|res://*/GroupsModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=abcd;Initial Catalog=AdvWorks;Persist Security Info=True;User ID=user;Password=pass;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>
Marin
  • 12,531
  • 17
  • 56
  • 80

1 Answers1

0

Solution

The app.config is a file name used in a project. However, when it is compiled, the file name becomes application's exe name + .config. For example, if the application name is "sample.exe", then the configuration name should be "sample.exe.config".

Marin
  • 12,531
  • 17
  • 56
  • 80