简体   繁体   中英

Can we override parent website's web.config?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM