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

Criei uma nova Solução no Visual Studio 2008 e criei dois projetos nesta solução: Class Library e Website.

Na Class Library criei um arquivo ADO.NET Entity Data Model, onde fiz o mapeamento das tabelas do banco de dados.

Configurei o Website para utilizar o modelo do Entity Framework da Class Library e ao executar o projeto estourou o erro abaixo:

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

Após pesquisar encontrei a solução:

Copie a string de conexão do app.config da Class Library para o Web.Config do Website que o .NET Framework passará a encontrar a conexão com o banco de dados.

Divirta-se.

2 Responses to “Entity Framework Error: The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.”

Leave a Reply