Bewerken

Share via


ICredentialsByHost.GetCredential(String, Int32, String) Method

Definition

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

public:
 System::Net::NetworkCredential ^ GetCredential(System::String ^ host, int port, System::String ^ authenticationType);
public System.Net.NetworkCredential GetCredential (string host, int port, string authenticationType);
public System.Net.NetworkCredential? GetCredential (string host, int port, string authenticationType);
abstract member GetCredential : string * int * string -> System.Net.NetworkCredential
Public Function GetCredential (host As String, port As Integer, authenticationType As String) As NetworkCredential

Parameters

host
String

The host computer that is authenticating the client.

port
Int32

The port on host that the client will communicate with.

authenticationType
String

The authentication protocol.

Returns

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

Applies to