共用方式為


IChannelCredentials.SetWindowsCredential 方法

定義

設定 Windows 認證。

public:
 void SetWindowsCredential(System::String ^ domain, System::String ^ userName, System::String ^ password, int impersonationLevel, bool allowNtlm);
public void SetWindowsCredential (string domain, string userName, string password, int impersonationLevel, bool allowNtlm);
abstract member SetWindowsCredential : string * string * string * int * bool -> unit
Public Sub SetWindowsCredential (domain As String, userName As String, password As String, impersonationLevel As Integer, allowNtlm As Boolean)

參數

domain
String

網域。

userName
String

使用者名稱。

password
String

密碼。

impersonationLevel
Int32

模擬等級。

allowNtlm
Boolean

允許 NTLM 驗證配置。

適用於