HttpClientCredentialType 列舉

定義

Enumerates the valid credential types for HTTP clients.Enumerates the valid credential types for HTTP clients.

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

欄位

Basic 1

Specifies Basic authentication.Specifies Basic authentication. For more information, see RFC 2617 - HTTP Authentication: Basic and Digest Authentication.For more information, see RFC 2617 - HTTP Authentication: Basic and Digest Authentication.

Certificate 5

Specifies client authentication using a certificate.Specifies client authentication using a certificate.

Digest 2

Specifies Digest authentication.Specifies Digest authentication. For more information, see RFC 2617 - HTTP Authentication: Basic and Digest Authentication.For more information, see RFC 2617 - HTTP Authentication: Basic and Digest Authentication.

InheritedFromHost 6

The authentication is inherited from the host.The authentication is inherited from the host.

None 0

Specifies anonymous authentication.Specifies anonymous authentication.

Ntlm 3

Specifies client authentication using NTLM.Specifies client authentication using NTLM.

Windows 4

Specifies client authentication using Windows.Specifies client authentication using Windows.

範例

下列程式碼示範如何將 ClientCredentialType 設定為這個列舉的成員。The following code shows how to set ClientCredentialType to a member of this enumeration.

// 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 會使用這個列舉,來指定驗證所要使用的用戶端認證型別。This enumeration is used by ClientCredentialType to specify the type of client credential to be used for authentication.

請注意,如果 SecurityMode 設為 TransportWithMessageCredential,則會忽略 HttpClientCredentialType 的值。Note that if SecurityMode is set to TransportWithMessageCredential, then the value of HttpClientCredentialType is ignored.

適用於