HttpWebRequestSettings Class

Configures the maximum length for response headers.

Syntax

class HttpWebRequestSettings : EmbeddedObject  

Methods

This class contains no methods.

Properties

The following table lists the properties exposed by the HttpWebRequestSettings class.

Name Description
MaximumErrorResponseLength A read/write sint32 value that specifies the maximum allowed length, in kilobytes, of an error response. The default is 64.
MaximumResponseHeadersLength A read/write sint32 value that specifies the maximum allowed length of the response headers. The default is 64.

The length is measured in kilobytes (1024 bytes) and it includes the response status line and the response headers, as well as all extra control characters received as part of the HTTP protocol. A value of -1 means no limit is imposed on the response headers; a value of 0 means that all requests will fail.
MaximumUnauthorizedUploadLength A read/write sint32 value that specifies the maximum length, in bytes, of an upload in response to an unauthorized error code. The default is –1, which indicates that no size limit will be imposed on the upload.
UseUnsafeHeaderParsing A read/write boolean value. true if validation errors that occur during HTTP parsing are ignored; otherwise, false. The default is false.

Subclasses

This class contains no subclasses.

Remarks

Instances of this class are contained in the HttpWebRequest property of the SettingsSection class.

Inheritance Hierarchy

EmbeddedObject

HttpWebRequestSettings

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
SettingsSection Class