ICredentialsByHost.GetCredential(String, Int32, String) 方法

定義

傳回指定主機、連接埠和驗證通訊協定的認證。

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

參數

host
String

驗證用戶端的主機電腦。

port
Int32

用戶端將與之通訊的 host 連接埠。

authenticationType
String

驗證通訊協定。

傳回

指定主機、連接埠和驗證通訊協定的 NetworkCredential,如果指定主機、連接埠和驗證通訊協定沒有認證,則為 null

備註

的值 authType 會對應至 IAuthenticationModule.AuthenticationType 屬性。

適用於