HttpWebRequest.DefaultMaximumResponseHeadersLength Property
Gets or sets the default maximum allowed length of the response headers.
Namespace: System.Net
Assembly: System (in system.dll)
Syntax
public static int DefaultMaximumResponseHeadersLength { get; set; }
Property Value
The default maximum allowed length of the response headers.
Remarks
On creation of an HttpWebRequest instance, this value is used for the MaximumResponseHeadersLength property. 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.
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