Share via


HttpWebRequest.MaximumResponseHeadersLength Property

Gets or sets the maximum allowed length of the response headers.

Namespace: System.Net
Assembly: System (in system.dll)

Syntax

public int MaximumResponseHeadersLength { get; set; }

Property Value

The length, in KB, of the response headers.

Remarks

The length of the response header includes the response status line and any extra control characters that are received as part of HTTP protocol. A value of -1 means no limit is imposed on the response headers; a value of 0 means that all requests fail. If this property is not explicitly set, it defaults to the value of the DefaultMaximumResponseHeadersLength property.

Exceptions

Exception type Condition
ArgumentOutOfRangeException The specified value is a negative number other than -1.

Version Information

Available in the .NET Micro Framework versions 4.0 and 4.1.

See Also

Reference

HttpWebRequest Class
HttpWebRequest Members
System.Net Namespace