HttpClientCredentialType 列舉

定義

列舉 HTTP 用戶端的有效認證型別。

public enum class HttpClientCredentialType
public enum HttpClientCredentialType
type HttpClientCredentialType = 
Public Enum HttpClientCredentialType
繼承
HttpClientCredentialType

欄位

Basic 1

指定基本驗證。 如需詳細資訊,請參閱 RFC 2617 - HTTP 驗證:基本和摘要式驗證

Certificate 5

使用憑證指定用戶端驗證。

Digest 2

指定摘要式驗證。 如需詳細資訊,請參閱 RFC 2617 - HTTP 驗證:基本和摘要式驗證

InheritedFromHost 6

驗證繼承自主機。

None 0

指定匿名驗證。

Ntlm 3

使用 NTLM 指定用戶端驗證。

Windows 4

使用 Windows 指定用戶端驗證。

範例

下列程式碼示範如何將 ClientCredentialType 設定為這個列舉的成員。

// The code uses a shortcut to specify the security mode to Transport.
WSHttpBinding b = new WSHttpBinding(SecurityMode.Transport);
b.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;
' The code uses a shortcut to specify the security mode to Transport.
Dim b As WSHttpBinding = New WSHttpBinding(SecurityMode.Transport)
b.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows

備註

ClientCredentialType 會使用這個列舉,來指定驗證所要使用的用戶端認證型別。

請注意,如果 SecurityMode 設為 TransportWithMessageCredential,則會忽略 HttpClientCredentialType 的值。

適用於