WebClientProtocol.PreAuthenticate Property

Gets or sets whether pre-authentication is enabled.

[Visual Basic]
Public Property PreAuthenticate As Boolean
public bool PreAuthenticate {get; set;}
public: __property bool get_PreAuthenticate();
public: __property void set_PreAuthenticate(bool);
public function get PreAuthenticate() : Boolean;
public function set PreAuthenticate(Boolean);

Property Value

true to pre-authenticate the request; otherwise, false. The default is false.


When PreAuthenticate is true, the WWW-authenticate header is sent with the first request if the authentication mechanism supports doing so. When PreAuthenticate is false, a request is made to the XML Web service method without initially attempting to authenticate the user. If the XML Web service allows anonymous access, then the XML Web service method is executed. If anonymous access is disallowed, a 401 HTTP return code is sent back to the client. In response, the WebClientProtocol class returns authentication credentials to the Web server. If the client is authenticated and subsequently authorized to access the XML Web service, the XML Web service method is executed; otherwise the client is denied access.


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

See Also

WebClientProtocol Class | WebClientProtocol Members | System.Web.Services.Protocols Namespace | PreAuthenticate