MessageCredentialType MessageCredentialType MessageCredentialType MessageCredentialType Enum

Definición

Enumera los tipos de credencial de mensaje válidos.Enumerates the valid message credential types.

public enum class MessageCredentialType
public enum MessageCredentialType
type MessageCredentialType = 
Public Enum MessageCredentialType
Herencia
MessageCredentialTypeMessageCredentialTypeMessageCredentialTypeMessageCredentialType

Campos

Certificate Certificate Certificate Certificate 3

Especifica la autenticación del cliente mediante un certificado.Specifies client authentication using a certificate.

IssuedToken IssuedToken IssuedToken IssuedToken 4

Especifica la autenticación del cliente mediante un token emitido.Specifies client authentication using an issued token.

None None None None 0

Especifica la autenticación anónima.Specifies anonymous authentication.

UserName UserName UserName UserName 2

Especifica la autenticación del cliente mediante UserName.Specifies client authentication using UserName.

Windows Windows Windows Windows 1

Especifica la autenticación del cliente mediante Windows.Specifies client authentication using Windows.

Ejemplos

El código siguiente muestra cómo tener acceso y definir ClientCredentialType en un miembro de esta enumeración.The following code shows how to access and set ClientCredentialType to a member of this enumeration.

ServiceHost myServiceHost = new ServiceHost(typeof(CalculatorService));
// Create a binding to use.
WSHttpBinding binding = new WSHttpBinding();
binding.Security.Mode = SecurityMode.Message;
binding.Security.Message.ClientCredentialType =
    MessageCredentialType.Certificate;

// Set the client certificate.
myServiceHost.Credentials.ClientCertificate.SetCertificate(
    StoreLocation.CurrentUser,
    StoreName.My,
    X509FindType.FindBySubjectName,
    "client.com");
Dim myServiceHost As New ServiceHost(GetType(CalculatorService))
' Create a binding to use.
Dim binding As New WSHttpBinding()
binding.Security.Mode = SecurityMode.Message
binding.Security.Message.ClientCredentialType = _
MessageCredentialType.Certificate

' Set the client certificate.
myServiceHost.Credentials.ClientCertificate.SetCertificate( _
        StoreLocation.CurrentUser, _
        StoreName.My, _
        X509FindType.FindBySubjectName, _
        "client.com")

Comentarios

Esta enumeración se usa para especificar el tipo de credencial requerido por un enlace para la autenticación.This enumeration is used to specify the credential type required by a binding for authentication. Todos los enlaces estándar la utilizan excepto BasicHttpBinding, que utiliza BasicHttpMessageCredentialType.It is used by all standard bindings except the BasicHttpBinding, which uses BasicHttpMessageCredentialType.

Se aplica a