System.Net.HttpWebRequest.MaximumAutomaticRedirections Property

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

Syntax

public int MaximumAutomaticRedirections { get; set; }

Value

A int value that indicates the maximum number of redirection responses that the current instance will follow. The default value is implementation-specific.

Exceptions

TypeReason
ArgumentExceptionThe value specified for a set operation is less than or equal to zero.

Remarks

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

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0