Export (0) Print
Expand All

WebClientProtocol.PreAuthenticate Property

Gets or sets whether pre-authentication is enabled.

Namespace: System.Web.Services.Protocols
Assembly: System.Web.Services (in system.web.services.dll)

public:
property bool PreAuthenticate {
	bool get ();
	void set (bool value);
}
/** @property */
public boolean get_PreAuthenticate ()

/** @property */
public void set_PreAuthenticate (boolean value)

public function get PreAuthenticate () : boolean

public function set PreAuthenticate (value : boolean)

Not applicable.

Property Value

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

When a client requests a resource without using credentials, the server challenges the request and indicates what authentication schemes it supports. The client chooses an authentication scheme and sends the appropriate WWW-authenticate header to the server. When PreAuthenticate is true, the WWW-authenticate header is sent with all subsequent requests.

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.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft