ConfigurationSection.OverrideModeEffective Property

Definition

Gets a value indicating whether the current configuration section can effectively override its inherited settings.

public:
 property Microsoft::Web::Administration::OverrideMode OverrideModeEffective { Microsoft::Web::Administration::OverrideMode get(); };
public Microsoft.Web.Administration.OverrideMode OverrideModeEffective { get; }
member this.OverrideModeEffective : Microsoft.Web.Administration.OverrideMode
Public ReadOnly Property OverrideModeEffective As OverrideMode

Property Value

One of the OverrideMode values.

Remarks

Note

The OverrideModeEffective property is useful when you need to determine the effective override mode for a configuration section when the OverrideMode property is set to Microsoft.Web.Administration.OverrideMode.Inherit.

To determine the value of OverrideModeEffective, IIS 7 traverses up the inheritance hierarchy of configuration sections from the current section. It successively examines the OverrideMode property of each parent section until it reaches the overrideModeDefault attribute in the section schema definition. IIS 7 calculates the value of OverrideModeEffective by logically combining the values that it encounters and considering their hierarchical ranking.

Note

overrideModeDefault is an optional attribute that contains the default lockdown state of a configuration section. The overrideModeDefault attribute for each configuration section is located in the corresponding section definition under <configSections> in the ApplicationHost.config file. If overrideModeDefault is missing, its value is Microsoft.Web.Administration.OverrideMode.Allow. If Allow is specified, lower-level Web.config files may override settings for the section; if Microsoft.Web.Administration.OverrideMode.Deny is specified, they cannot. The overrideModeDefault default for most IIS 7 Web server sections is Deny. The default for most ASP.NET and .NET Framework sections is Allow.

The overrideModeDefault attribute has no corresponding property in Windows Management Instrumentation (WMI). If you have appropriate permissions, you can edit the ApplicationHost.config file directly, or you can access it programmatically by using XML parsing or file-access APIs.

Applies to