WSFederationHttpSecurity.Mode Property

Gets or sets the type of security to be applied.

Namespace: System.ServiceModel
Assembly: System.ServiceModel (in system.servicemodel.dll)

public WSFederationHttpSecurityMode Mode { get; set; }
/** @property */
public WSFederationHttpSecurityMode get_Mode ()

/** @property */
public void set_Mode (WSFederationHttpSecurityMode value)

public function get Mode () : WSFederationHttpSecurityMode

public function set Mode (value : WSFederationHttpSecurityMode)

Not applicable.

Property Value

A WSFederationHttpSecurityMode. The default is Message.

The enumeration member returned specifies which general type of security is to be applied.

The allowed values are Message and TransportWithMessageCredential.

In the Message security mode, the message is sent over HTTP and SOAP message security is used to protect the message. Client authentication is performed based on the issued token obtained from the security token service. Server authentication is based on the server's certificate.

In the TransportWithMessageCredential security mode, the message is sent over HTTPS. Client authentication is performed by including the issued token obtained from the security token service in the SOAP message. Server authentication, based on the server's certificate, is performed as part of the HTTPS connection setup.

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;

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions