Reputation: 3405
By default, ASP.NET splits up your web.config so that razor-related items are included in "~/views/web.config" while everything else is put into "~/web.config".
For me, it would make sense to combine all of it into one so that it would apply to the entire site. Would there be any downside to doing this?
Upvotes: 1
Views: 203
Reputation: 4814
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:
web.config
there.There's bound to be other reasons too, but they come to mind right now.
Upvotes: 1