HttpClientCredentialType Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enumerates the valid credential types for HTTP clients.
public enum class HttpClientCredentialType
public enum HttpClientCredentialType
type HttpClientCredentialType =
Public Enum HttpClientCredentialType
- Inheritance
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.