System.Net.ICredentials.GetCredential Method

Returns a System.Net.NetworkCredential object that is associated with the specified URI, and authentication type.

Syntax

public NetworkCredential GetCredential (Uri uri, string authType)

Parameters

uri
The Uri that the client is providing authentication for.
authType
The type of authentication, as defined in the IAuthenticationModule.AuthenticationType property.

Returns

The System.Net.NetworkCredential that is associated with the specified URI and authentication type, or, if no credentials are available, null.

Remarks

The ICredentials.GetCredential(Uri, string) method returns a System.Net.NetworkCredential instance that contains the credentials that are associated with the specified URI and authorization scheme. When no credentials are available, the ICredentials.GetCredential(Uri, string) method returns null.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0