I’ve been working with ASP.NET MVC more for the past few months and I keep forgetting to write a quick blog post about this error message. I receive the following error message on almost all of my projects. The annoying part is that it compiles fine!
The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
You will get this if you are using Entity Framework and have the edmx/app.config in a seperate place from your main website. The connection information within the app.config file needs to be copied/the same as the connection information contained within the web.config on the root of your website. Set that up and this error will go away. Hopefully you won’t be banging your head with this error!