Gets or sets a value indicating whether to send a authenticate header with the request.
[Visual Basic]
Overrides Public Property PreAuthenticate As Boolean
[C#]
public override bool PreAuthenticate {get; set;}
[C++]
public: __property bool get_PreAuthenticate();
public: __property void set_PreAuthenticate(bool);
[JScript]
public override function get PreAuthenticate() : Boolean;
public override function set PreAuthenticate(Boolean); Property Value
true to send a WWW-authenticate HTTP header with the initial request; otherwise, false. The default is false.
Remarks
After a client request is successfully authenticated, if PreAuthenticate is true and credentials are supplied, the WWW-authenticate header is sent with each request; otherwise, the request uses standard authentication procedures.
The following dialog between client and server illustrates the effect of this property.
Preauthenticate is false:
Client: GET someUrl
Server: 401 WWW-Authenticate Basic
Client: GET with Authorization headers
Server: 200 OK
Client: GET someUrl2
Server: 401 WWW-Authenticate Basic
Client: GET with Authorization headers
Server: 200 OK
Preauthenticate is true:
Client: GET someUrl
Server: 401 WWW-Authenticate Basic
Client: GET with Authorization headers
Server: 200 OK
Client: GET someUrl2 with Authorization headers
If the authentication scheme does not support preauthentication, the value of this property is ignored.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard
See Also
HttpWebRequest Class | HttpWebRequest Members | System.Net Namespace