Prevent web.config inheritance to a specific appli

2019-08-10 08:52发布

问题:

I have so many applications configured under a IIS domain. But this WCF application doesn't need the parent web.config. It has its own web.config. How can I prevent it ?

回答1:

If you are using II7+ then IIS Locking can help

IIS 7.0 and above allows locking and unlocking configuration settings in various levels and scopes. Locking down configuration means that it cannot be overridden (or set at all) at lower levels in the hierarchy. Unlocking configuration can only be done at the level where it was locked. This is useful, for example, when creating different configuration for different sites or paths, and only some of sites and paths are allowed to override it.