问题
I have a website and a sub website. Now I am facing problem that is my sub website's web.config file is inheriting parent website's web.config file.
My parent website's web.config file has some <configSections>
and my sub website does not need these <configSections>
.
How can I do this ? I try to search net but find nothing helpful.
回答1:
Yes, you can specify allowOverride
in the parent web.config in a location section to allow child web.config values to override the parent ones.
You can also set inheritInChildApplications
to false so that your sections aren't automatically inherited into the child web.config.
来源:https://stackoverflow.com/questions/9234492/can-we-override-parent-websites-web-config