As you've seen it's valid to have multiple web.config
files in a website, under different folders.
In your main web.config
(at the site root), you can specify different configuration at different folders in the site using the <location>
element. Having a web.config
file in that folder (location) instead has the same effect, so consolidation is possible.
However, I would suggest leaving it be:
- It's arguably easier to manage this separate configuration which is specific to the view engine being used.
- Any future maintainers will be familiar to MVC and so expect to see the extra
web.config
there. - The same could be said for any Nuget packages which you may need, that expect it to be there also.
There's bound to be other reasons too, but they come to mind right now.