Editar

Compartir a través de


HttpClientCredentialType Enum

Definition

Enumerates the valid credential types for HTTP clients.

public enum class HttpClientCredentialType
public enum HttpClientCredentialType
type HttpClientCredentialType = 
Public Enum HttpClientCredentialType
Inheritance
HttpClientCredentialType

Fields

Name Value Description
None 0

Specifies anonymous authentication.

Basic 1

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

Digest 2

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

Ntlm 3

Specifies client authentication using NTLM.

Windows 4

Specifies client authentication using Windows.

Certificate 5

Specifies client authentication using a certificate.

InheritedFromHost 6

The authentication is inherited from the host.

Examples

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

Remarks

This enumeration is used by ClientCredentialType to specify the type of client credential to be used for authentication.

Note that if SecurityMode is set to TransportWithMessageCredential, then the value of HttpClientCredentialType is ignored.

Applies to