System.Net.ICredentialsByHost.GetCredential Method

Returns the credential for the specified host, port, and authentication protocol.

Syntax

public NetworkCredential GetCredential (string host, int port, string authenticationType)

Parameters

host
The host computer that is authenticating the client.
port
The port on host that the client will communicate with.
authenticationType
The authentication protocol.

Returns

A System.Net.NetworkCredential for the specified host, port, and authentication protocol, or null if there are no credentials available for the specified host, port, and authentication protocol.

Remarks

The value of authType corresponds to the IAuthenticationModule.AuthenticationType property.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0