Skip to content

Latest commit

 

History

History
95 lines (75 loc) · 5.39 KB

requestlimitselement-class.md

File metadata and controls

95 lines (75 loc) · 5.39 KB
title description ms.date ms.assetid
RequestLimitsElement Class
Describes the RequestLimitsElement class and provides the class' syntax, properties, remarks, examples, inheritance hierarchies, and requirements.
10/07/2016
ad0f126f-9538-318d-dee0-c77a72fba0c5

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 [!INCLUDEiisver] 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

EmbeddedObject

RequestLimitsElement

Requirements

Type Description
Client - [!INCLUDEiis70] on [!INCLUDEwinvista]
- [!INCLUDEiis75] on [!INCLUDEwin7]
- [!INCLUDEiis80] on [!INCLUDEwin8]
- [!INCLUDEiis100] on [!INCLUDEwin10]
Server - [!INCLUDEiis70] on [!INCLUDEwinsrv2008]
- [!INCLUDEiis75] on [!INCLUDEwinsrv2008r2]
- [!INCLUDEiis80] on [!INCLUDEwinsrv2012]
- [!INCLUDEiis85] on [!INCLUDEwinsrv2012r2]
- [!INCLUDEiis100] on [!INCLUDEwinsrv2016]
Product - [!INCLUDEiis70], [!INCLUDEiis75], [!INCLUDEiis80], [!INCLUDEiis85], [!INCLUDEiis100]
MOF file WebAdministration.mof

See Also

EmbeddedObject Class
FileExtensionsSettings Class
HeaderLimitsElement Class
HeaderLimitsSettings Class
RequestFilteringSection Class
<requestLimits>
VerbsSettings Class