RequestLimitsElement Class
Specifies size limits on incoming HTTP requests.
Syntax
class RequestLimitsElement : EmbeddedObject
Methods
This class contains no methods.
Properties
The following table lists the properties exposed by the RequestLimitsElement
class.
Name | Description |
---|---|
HeaderLimits |
A HeaderLimitsSettings value that specifies HTTP header sizes. |
MaxAllowedContentLength |
A read/write uint32 value that specifies the maximum length, in bytes, of content in a request. The default is 30000000 (approximately 30 megabytes.) |
MaxQueryString |
A read/write uint32 value that specifies the maximum length, in bytes, of the query string. The default is 2048. |
MaxUrl |
A read/write uint32 value that specifies the maximum length, in bytes, of the request URL. The default is 260. |
Subclasses
This class contains no subclasses.
Remarks
Instances of this class are contained in the RequestLimits
array property of the RequestFilteringSection class.
This class integrates into IIS 7 the RequestLimits
settings of the URLScan tool used by previous versions of IIS.
Note
You must install the Request Filtering Module (Modrqflt.dll) for the settings in this class to 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=''")
' Set a variable to the RequestFilteringSection.RequestLimits property,
' which contains an array of RequestLimitsElement objects.
Set oRequestLimitsElement = oRequestFilteringSection.RequestLimits
' Display the path and list the non-array RequestLimitsElement properties.
WScript.Echo "[Request Limits]"
WScript.Echo "Path: " & oRequestFilteringSection.Path
WScript.Echo "maxAllowedContentLength: " & _
oRequestLimitsElement.maxAllowedContentLength
WScript.Echo "maxUrl: " & oRequestLimitsElement.maxUrl
WScript.Echo "maxQueryString: " & oRequestLimitsElement.maxQueryString
WScript.Echo
' List the contents of the RequestLimitsElement.HeaderLimits.HeaderLimits
' property, which contains an array of HeaderLimitsElement instances.
WScript.Echo vbtab & "[Header Limits]"
For Each oHeaderLimit In oRequestLimitsElement.HeaderLimits.HeaderLimits
WScript.Echo vbtab & "Header: " & oHeaderLimit.Header
WScript.Echo vbtab & "Header size limit: " & oHeaderLimit.sizeLimit
WScript.Echo
Next
Inheritance Hierarchy
RequestLimitsElement
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
EmbeddedObject Class
FileExtensionsSettings Class
HeaderLimitsElement Class
HeaderLimitsSettings Class
RequestFilteringSection Class
<requestLimits>
VerbsSettings Class