Export (0) Print
Expand All

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)

'Declaration
Public Shared Function Authenticate ( _
	challenge As String, _
	request As WebRequest, _
	credentials As ICredentials _
) As Authorization
'Usage
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
Not applicable.

Parameters

challenge

The challenge returned by the Internet resource.

request

The WebRequest that initiated the authentication challenge.

credentials

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

ArgumentNullException

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

-or-

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

-or-

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

Community Additions

ADD
Show:
© 2014 Microsoft