Authenticate Method
Collapse the table of content
Expand the table of content

AuthenticationManager.Authenticate Method (String, WebRequest, ICredentials)


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 member Authenticate : 
        challenge:string *
        request:WebRequest *
        credentials:ICredentials -> Authorization


Type: System.String

The challenge returned by the Internet resource.

Type: System.Net.WebRequest

The WebRequest that initiated the authentication challenge.

Type: System.Net.ICredentials

The ICredentials associated with this request.

Return Value

Type: System.Net.Authorization

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 null.

Exception Condition

challenge is null.


request is null.


credentials is null.

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 null.

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

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft