Professional ASP.NET 1.1 [Electronic resources]

Alex Homeret

نسخه متنی -صفحه : 244/ 211
نمايش فراداده

Changes in the System.Net Namespace

The

System.Net.HttpWebRequest class gains two new properties that set the value for the size of the HTTP headers that the

HttpWebRequest class will read. The

MaximumResponseHeadersLength property sets the value for specific instances of the class, and the

DefaultMaximumResponseHeadersLength sets the defaul value. In both cases, the value is an

Integer representing the number of KB (multiples of 1,024 bytes). To allow any length of header, set the value to

-1 . Setting it to zero will cause all requests to fail. The values can also be set in

machine.config and

web.config :

<httpRequest maximumResponseHeadersLength="integer" />

The

System.Net.HttpWebRequest class gains a new property

UnsafeAuthenticatedConnectionSharing that can be set to

True to allow an authenticated connection to be shared between requests.

The

System.Net.WebExceptionStatus enumeration gains two new values.

MessageLengthLimitExceeded indicates that the headers of the request exceed the currently enforced limits.

UnknownError indicates that the Framework cannot determine the actual reason for the error.