Share via


MaximumAutomaticRedirections Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

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

Syntax

'Declaration
Public ReadOnly Property MaximumAutomaticRedirections As Integer
public int MaximumAutomaticRedirections { get; }
public:
property int MaximumAutomaticRedirections {
    int get ();
}
member MaximumAutomaticRedirections : int with get
function get MaximumAutomaticRedirections () : int

Property Value

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

Exceptions

Exception Condition
ArgumentException

The value is set to 0 or less.

Remarks

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

.NET Framework Security

See Also

Reference

HttpWebRequest Class

System.Net Namespace