Trying to find a solution, I read this question: What does the Web.Config file do in the MVC project views folder
But I still want to know: why do I need web.config in all view folders in MVC?
This answer The web.config file exists in the Views folders, to prevent access to your views by any means other than your controller, it is not enough for me, if it is true, this is a temporary solution.
If this is really the only reason, this is a huge moment for improvement. But I am sure that there is a good reason for this.
source
share