Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No connection string named "thenameofmyconnection" could be found in the application config file

I am working with entity framework and azure, I got a WCF in a web role which uses methods from the project with entity framework..it seems that I am placing the connection string on the wrong file or that I am defining it wrongly.. it is as follows :

<connectionStrings>
  <!-- Windows Azure SQL Database Connection String -->

  <add name="AMTEntitiesContainer" 
   connectionString="here goes my connection string" 
   providerName="System.Data.EntityClient" />

</connectionStrings>

This is inside my app.config file in my entities library project..should it go to into the config of my webrole? or should it go into my WCF service ?

like image 763
Bryan Arbelo - MaG3Stican Avatar asked Apr 05 '13 14:04

Bryan Arbelo - MaG3Stican


2 Answers

The connection string should be in the web.config of the WCF service. The EntityFramework project will be executed in-process. The WCF service is the process running.

like image 137
Andy Nichols Avatar answered Nov 14 '22 20:11

Andy Nichols


This could be also helpful to understand these things.

I'm sorry for the post, I can not write comments yet.

like image 37
gkovacs90 Avatar answered Nov 14 '22 20:11

gkovacs90