WSFederationHttpSecurity.Mode Propiedad

Definición

Obtiene o establece el tipo de seguridad que va a aplicarse.Gets or sets the type of security to be applied.

public:
 property System::ServiceModel::WSFederationHttpSecurityMode Mode { System::ServiceModel::WSFederationHttpSecurityMode get(); void set(System::ServiceModel::WSFederationHttpSecurityMode value); };
public System.ServiceModel.WSFederationHttpSecurityMode Mode { get; set; }
member this.Mode : System.ServiceModel.WSFederationHttpSecurityMode with get, set
Public Property Mode As WSFederationHttpSecurityMode

Valor de propiedad

WSFederationHttpSecurityMode

Objeto WSFederationHttpSecurityMode.A WSFederationHttpSecurityMode. El valor predeterminado es Message.The default is Message.

Ejemplos

El código siguiente muestra cómo establecer esta propiedad.The following code shows how to set this property.

// This method creates a WSFederationHttpBinding.
public static WSFederationHttpBinding
    CreateWSFederationHttpBinding(bool isClient)
{
  // Create an instance of the WSFederationHttpBinding.
  WSFederationHttpBinding b = new WSFederationHttpBinding();

  // Set the security mode to Message.
  b.Security.Mode = WSFederationHttpSecurityMode.Message;
' This method creates a WSFederationHttpBinding.
Public Shared Function CreateWSFederationHttpBinding(ByVal isClient As Boolean) As WSFederationHttpBinding
  ' Create an instance of the WSFederationHttpBinding.
  Dim b As New WSFederationHttpBinding()

  ' Set the security mode to Message.
  b.Security.Mode = WSFederationHttpSecurityMode.Message

Comentarios

El miembro de enumeración devuelto especifica qué tipo general de seguridad va a aplicarse.The enumeration member returned specifies which general type of security is to be applied.

Los valores permitidos son Message y TransportWithMessageCredential.The allowed values are Message and TransportWithMessageCredential.

En el modo de seguridad Message, el mensaje se envía por HTTP y se usará la seguridad del mensaje SOAP para proteger el mensaje.In the Message security mode, the message is sent over HTTP and SOAP message security is used to protect the message. La autenticación del cliente se realiza según el token emitido obtenido a partir del servicio de token de seguridad.Client authentication is performed based on the issued token obtained from the security token service. La autenticación del servidor se basa en el certificado del servidor.Server authentication is based on the server's certificate.

En el modo de seguridad TransportWithMessageCredential, el mensaje se envía por HTTPS.In the TransportWithMessageCredential security mode, the message is sent over HTTPS. La autenticación del cliente se realiza incluyendo el token emitido y obtenido a partir del servicio de token de seguridad en el mensaje SOAP.Client authentication is performed by including the issued token obtained from the security token service in the SOAP message. La autenticación del servidor, basada en el certificado del servidor, se realiza como parte de la configuración de conexión HTTPS.Server authentication, based on the server's certificate, is performed as part of the HTTPS connection setup.

Se aplica a