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)

Public Shared Function Authenticate ( _
	challenge As String, _
	request As WebRequest, _
	credentials As ICredentials _
) As Authorization
Dim challenge As String
Dim request As WebRequest
Dim credentials As ICredentials
Dim returnValue As Authorization

returnValue = AuthenticationManager.Authenticate(challenge, request, credentials)
public static Authorization Authenticate (
	String challenge, 
	WebRequest request, 
	ICredentials credentials
public static function Authenticate (
	challenge : String, 
	request : WebRequest, 
	credentials : ICredentials
) : Authorization



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 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0