My ASP.NET MVC web application has 5 areas. Each area has its own Views folder with it's own Web.config in it. That makes 6 configuration files together with the main Web.config at the application root. It makes it a bit difficult to manage.
As far as I know, these configs make two things (at least by default):
1.) Setup the Razor host factory to include selected namespaces by default.
2.) Block direct access to the files in the Views folder by handling the requests with a HttpNotFoundHandler.
The code in all of those Web.config files is almost identical for me and it doesn't seem to me like a good way to manage these configurations. If I added more areas or organized my code more granularly, I could end up with more that just 5 Web.config files. Why would I need so many? Isn't one enough?
My thoughts on the points are following:
ad 1.) Cannot all of these namespaces be imported either once in the application root Web.config file instead or imported in a _ViewStart.cshtml file?
ad 2.) Wouldn't it make more sense to block access to all code files in all folders and then use the opposite approach -- i.e. change the folders with static files in them (like Assets folder) to use StaticFileHandler? In principle, it seems like a more secure approach to me to whitelist the files that are allowed be read by StaticFileHandler rather than to specify which files should be handled by HttpNotFoundHandler.
Is this doable? Am I missing something? Has anybody else encountered similar issues with having too many Views Web.config files?
Thanks for answers.

Controllersfolder with 20 controllers in it rather thanControllersfolder with 100 controllers in it. The same goes for theViewsfolder, there would be just too many folders inside of it. But you're right that leaving the idea of areas could be one solution to consider. It currently helps me keep the source code more organized, and I am quite happy with how it works.~/Controllers/Api/CreateJobController.csand~/Controllers/App/JobController.csfor instance. Still get all the organization without the headache!Controllerscould be one way of dealing with this. However, I am still quite happy with how the areas work and it makes sense to me, I actually also prefer the longer routes with area in my case. Thanks for your insights!