HeaderLimitsElement Class
Specifies the permitted sizes of HTTP request headers.
Syntax
class HeaderLimitsElement : CollectionElement
Methods
This class contains no methods.
Properties
The following table lists the properties exposed by the HeaderLimitsElement
class.
Name | Description |
---|---|
Header |
A required unique read/write string value that specifies an HTTP request header. The default is a null reference. The key property. |
SizeLimit |
A required uint32 value that specifies, in bytes, the maximum length of the HTTP request header specified in the Header property. |
Subclasses
This class contains no subclasses.
Remarks
Instances of this class are contained in the HeaderLimits
array property of the HeaderLimitsSettings class.
This class corresponds to the <headerLimits>
element in the <requestLimits>
section of the ApplicationHost.config file.
Note
You must install the Request Filtering Module (Modrqflt.dll) before the configuration settings in this class can take effect.
Example
The following example displays all the properties of the RequestLimitsElement
class.
' Connect to the WMI WebAdministration namespace.
Set objWMIService = GetObject("winmgmts:root\WebAdministration")
' Get the RequestFilteringSection.
Set oRequestFilteringSection = objWMIService.Get( _
"RequestFilteringSection.Path='MACHINE/WEBROOT/APPHOST',Location=''")
' Display the path and the contents of the
' RequestFilteringSection.RequestLimits.HeaderLimits.HeaderLimits
' property, which contains an array of HeaderLimitsElement instances.
WScript.Echo "[Header Limits]"
WScript.Echo "Path: " & oRequestFilteringSection.Path
WScript.Echo
For Each oHeaderLimit In oRequestFilteringSection.RequestLimits.HeaderLimits.HeaderLimits
WScript.Echo "Header: " & oHeaderLimit.Header
WScript.Echo "Header size limit: " & oHeaderLimit.sizeLimit
WScript.Echo
Next
Inheritance Hierarchy
HeaderLimitsElement
Requirements
Type | Description |
---|---|
Client | - IIS 7.0 on Windows Vista - IIS 7.5 on Windows 7 - IIS 8.0 on Windows 8 - IIS 10.0 on Windows 10 |
Server | - IIS 7.0 on Windows Server 2008 - IIS 7.5 on Windows Server 2008 R2 - IIS 8.0 on Windows Server 2012 - IIS 8.5 on Windows Server 2012 R2 - IIS 10.0 on Windows Server 2016 |
Product | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 |
MOF file | WebAdministration.mof |
See Also
CollectionElement Class
HeaderLimitsSettings Class
RequestFilteringSection Class
RequestLimitsElement Class