This documentation is archived and is not being maintained.

AuthenticationManager.Authenticate Method

Calls each registered authentication module to find the first module that can respond to the authentication request.

Namespace: System.Net
Assembly: System (in system.dll)

static Authorization^ Authenticate (
	String^ challenge, 
	WebRequest^ request, 
	ICredentials^ credentials
public static Authorization Authenticate (
	String challenge, 
	WebRequest request, 
	ICredentials credentials
public static function Authenticate (
	challenge : String, 
	request : WebRequest, 
	credentials : ICredentials
) : Authorization
Not applicable.



The challenge returned by the Internet resource.


The WebRequest that initiated the authentication challenge.


The ICredentials associated with this request.

Return Value

An instance of the Authorization class containing the result of the authorization attempt. If there is no authentication module to respond to the challenge, this method returns a null reference (Nothing in Visual Basic).

Exception typeCondition


challenge is a null reference (Nothing in Visual Basic).


request is a null reference (Nothing in Visual Basic).


credentials is a null reference (Nothing in Visual Basic).

The Authenticate method calls the IAuthenticationModule.Authenticate method on each registered authentication module until one of the module responds with an Authorization instance.

The first Authorization instance returned is used to authenticate the request. If no authentication module can authenticate the request, the Authenticate method returns a null reference (Nothing in Visual Basic).

Authentication modules are called in the order in which they are registered with the AuthenticationManager.

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