Mono Class Library: System.Net.WebRequest Overview | Members

System.Net.WebRequest.PreAuthenticate Property

Gets or sets a bool value that determines whether to send authentication information with the current request instead of waiting for an authentication challenge from the requested resource. [Edit]

public virtual bool PreAuthenticate { set; get; }

Value

true if authentication information will be sent with the current request without waiting for an authentication challenge from the requested resource; otherwise, false. [Edit]

Exceptions

TypeReason
NotSupportedExceptionThis property is not implemented in the derived class. [Edit]

Remarks

Operation
If WebRequest.PreAuthenticate is true , the current instance sends authentication credentials without waiting to be challenged by the server specified by the WebRequest.RequestUri property of the current instance. When this property is false , the current instance waits for a challenge from the server before sending credentials.

This property throws NotSupportedException.

Note to Inheritors
This property must be overridden by classes that inherit from System.Net.WebRequest to provide this functionality.

Usage
Use this property to ensure that authentication information is sent with every request. Setting this property to true allows clients to improve server efficiency by avoiding extra round trips caused by authentication challenges.

[Edit]

Requirements

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