serverpreview:SectionDefinition

Identifies an Internet Information Service (IIS) SectionDefinition as it pertains to a same-named XML element in an applicationHost.config file. The iisModule being installed claims ownership of this SectionDefinition inside the applicationHost.config file and in the corresponding SectionGroupDefinition hierarchy of the IIS instance that is installed on the target machine. If this SectionDefinition is defined at the root level, not inside a SectionGroupDefinition, and already exists at that level, installation is blocked.

Element hierarchy

<Package>
<Applications>
<Application>
<Extensions>
<serverpreview:Extension>
<serverpreview:IisModules>
<serverpreview:IisModule>
<serverpreview:SectionDefinition>
<serverpreview:SectionData>
<serverpreview:SectionDefinition>



Syntax

<serverpreview:SectionDefinition Name                 = A string between 1 and 
                                                        32767 characters in 
                                                        length with a non-
                                                        whitespace character at 
                                                        its beginning and end. 
                                 OverrideModeDefault? = "allow" | "deny"
                                 AllowDefinition?     = "machineonly" | 
                                                        "machineToRootWeb" | 
                                                        "appHostOnly" |
                                                        "machineToApplication" |
                                                        "everywhere" >
</serverpreview:SectionDefintion>

Key

      \* optional (zero or more)

Attributes and Elements

Attributes

Attribute Description Data type Required Default value
Name The name of the SectionDefinition. A string between 1 and 32767 characters in length with a non-whitespace character at its beginning and end. Yes
OverrideModeDefault Specifies whether or not this section is locked by default. Unlocked sections can further be delegated to site or application level by the IIS administrators after the installation.

This attribute can have one of the following values:

  • allow
  • deny
No
AllowDefinition Indicates where in the configuration file hierarchy this section can be defined.

This attribute can have one of the following values:

  • machineOnly
  • machineToRootWeb
  • appHostOnly
  • machineToApplication
  • everywhere
No everywhere

Child Elements

None.

Parent Elements

Parent Element Description
serverpreview:IisModule Identifies an Internet Information Service (IIS) module to install, update, or uninstall out-of-band on Nano Server.
serverpreview:SectionGroupDefinition Identifies an Internet Information Service (IIS) SectionGroupDefinition as it pertains to a same-named XML element in an applicationHost.config file. A SectionDefinition may be nested inside a hierarchy of one or more SectionGroupDefinitions. if not defined at the root level.

Examples

<Package ...
         xmlns:serverpreview=http://schemas.microsoft.com/appx/manifest/serverpreview/windows10"  
         IgnorableNamespaces="... serverpreview">
    <Applications>
        <Application>
            <Extensions>
                <serverpreview:Extension Category="windows.iisModules">  
                    <serverpreview:IisModules>  
                        <serverpreview:IisModule 
                                    Name="RewriteModule"  
                                    ModuleDll="rewrite.dll"  
                                    SchemaFileName="rewrite_schema.xml">  
                            <serverpreview:SectionGroupDefinition 
                                    Name="rewrite">  
                                <serverpreview:SectionDefinition 
                                    Name="rules"  
                                    OverrideModeDefault="allow"/>  
                                <serverpreview:SectionDefinition 
                                    Name="globalRules"  
                                    OverrideModeDefault="deny"                    
                                    AllowDefinition="appHostOnly"/>  
                                <serverpreview:SectionDefinition 
                                    Name="outboundRules"  
                                    OverrideModeDefault="allow"/>  
                                <serverpreview:SectionDefinition 
                                    Name="providers"  
                                    OverrideModeDefault="allow"/>  
                                <serverpreview:SectionDefinition 
                                    Name="rewriteMaps"  
                                    OverrideModeDefault="allow"/>  
                                <serverpreview:SectionDefinition 
                                    Name="allowedServerVariables"                          
                                    OverrideModeDefault="deny"/>  
                            </serverpreview:SectionGroupDefinition>  
                        </serverpreview:IisModule>  
                    </serverpreview:IisModules> 
                </serverpreview:Extension>  
            </Extensions>
        </Application>
    </Applications>
</Package>

Requirements

Namespace http://schemas.microsoft.com/appx/manifest/serverpreview/windows10