HttpWebRequest.MaximumAutomaticRedirections Property

Gets or sets the maximum number of redirects that the request follows.

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

member MaximumAutomaticRedirections : int with get, set

Property Value

Type: System.Int32
The maximum number of redirection responses that the request follows. The default value is 50.

ExceptionCondition
ArgumentException

The value is set to 0 or less.

The MaximumAutomaticRedirections property sets the maximum number of redirections for the request to follow if the AllowAutoRedirect property is true.

The following code example sets the value of this property.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft