System.Net.WebRequest.PreAuthenticate Property

When overridden in a descendant class, indicates whether to pre-authenticate the request.

Syntax

public virtual bool PreAuthenticate { get; set; }

Value

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

Exceptions

TypeReason
NotSupportedExceptionThis property is not implemented in the derived class.

Remarks

With the exception of the first request, the WebRequest.PreAuthenticate property indicates whether to send authentication information with subsequent requests without waiting to be challenged by the server. When WebRequest.PreAuthenticate is false, the System.Net.WebRequest waits for an authentication challenge before sending authentication information.

Note:

The System.Net.WebRequest class is an abstract class. The actual behavior of System.Net.WebRequest instances at run time is determined by the descendant class returned by the WebRequest.Create(Uri) method. For more information about default values and exceptions, see the documentation for the descendant classes, such as System.Net.HttpWebRequest and System.Net.FileWebRequest.

Requirements

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