In any .NET application, only one config file is the natural starting point for looking for configuration information. For web applications, that's the web.config
file at the root of the application1.
Whilst you may have a file called app.config
in your repository project (and, indeed, some VS tooling may have added one) or your EF project, it's not used when you try to read configuration information.
The connection string section needs to exist in the web.config of your MVC app.
1For non-web applications, it's the app.config
for the project that produces the .exe
file and that gets automatically copied as XXX.exe.config
during the build.