This topic has not yet been rated - Rate this topic

SecurityBindingElement Class

An abstract class that, when implemented, represents a binding element that supports channel SOAP message security.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)
public abstract class SecurityBindingElement : BindingElement

The SecurityBindingElement type exposes the following members.

  Name Description
Public property AllowInsecureTransport Gets or sets a value that indicates whether mixed-mode secured messages can be sent over an unsecured transport such as HTTP.
Public property DefaultAlgorithmSuite Gets or sets the message encryption and key-wrap algorithms.
Public property EnableUnsecuredResponse Gets or sets a value that indicates whether can send and receive unsecured responses to secured requests.
Public property EndpointSupportingTokenParameters Gets the endpoint that supports token parameters.
Public property Supported by Portable Class Library IncludeTimestamp Gets or sets a value that indicates whether time stamps are included in each message.
Public property KeyEntropyMode Gets or sets the source of entropy used to create keys.
Public property Supported by Portable Class Library LocalClientSettings Gets the binding properties specific to local security settings used by the client.
Public property LocalServiceSettings Gets the binding properties specific to local security settings used by the service.
Public property MessageSecurityVersion Gets or sets the message security version.
Public property OperationSupportingTokenParameters Gets the collection of operation supporting token parameters.
Public property OptionalEndpointSupportingTokenParameters Gets the optional supporting token parameters for the service endpoint.
Public property OptionalOperationSupportingTokenParameters Gets the collection of optional operation supporting token parameters.
Public property SecurityHeaderLayout Gets or sets the ordering of the elements in the security header for this binding.
Top
  Name Description
Public method Supported by Portable Class Library BuildChannelFactory<TChannel> Creates a channel factory based on the SecurityBindingElement settings and the binding context passed in. The channel factory created is a SOAP message security channel factory, which internally has a reference to the channel factory that corresponds to the binding context, (which includes the transport channel factory). (Overrides BindingElement.BuildChannelFactory<TChannel>(BindingContext).)
Protected method Supported by Portable Class Library BuildChannelFactoryCore<TChannel> When implemented, creates a channel factory of a specified type.
Public method BuildChannelListener<TChannel> Creates a channel listener based on the SecurityBindingElement settings and the binding context passed in. (Overrides BindingElement.BuildChannelListener<TChannel>(BindingContext).)
Protected method BuildChannelListenerCore<TChannel> When implemented, creates a channel listener of a specified type.
Public method Supported by Portable Class Library CanBuildChannelFactory<TChannel> Gets a value that indicates whether a channel factory of the specified type can be built. (Overrides BindingElement.CanBuildChannelFactory<TChannel>(BindingContext).)
Public method CanBuildChannelListener<TChannel> Gets a value that indicates whether a channel listener of the specified type can be built. (Overrides BindingElement.CanBuildChannelListener<TChannel>(BindingContext).)
Public method Supported by Portable Class Library Clone When overridden in a derived class, returns a copy of the binding element object. (Inherited from BindingElement.)
Public method Static member CreateAnonymousForCertificateBindingElement Creates a symmetric security binding element that is configured for anonymous client authentication and certificate-based server authentication.
Public method Static member CreateCertificateOverTransportBindingElement() Creates a security binding element that expects clients to do certificate-based authentication using SOAP message security.
Public method Static member CreateCertificateOverTransportBindingElement(MessageSecurityVersion) Creates a security binding element that expects clients to do certificate-based authentication using SOAP message security.
Public method Static member CreateCertificateSignatureBindingElement Creates a binding element using a certificate to sign messages. This binding element can be used only for one-way message exchanges and is capable only of signing the message.
Public method Static member CreateIssuedTokenBindingElement Creates a symmetric security binding element that is configured to require client authentication using a symmetric-key based issued token.
Public method Static member CreateIssuedTokenForCertificateBindingElement Creates a symmetric security binding element that is configured to require client authentication based on an issued token and server authentication based on the server certificate.
Public method Static member CreateIssuedTokenForSslBindingElement(IssuedSecurityTokenParameters) Creates a symmetric security binding element that is configured to require client authentication based on an issued token and server authentication based on the server certificate.
Public method Static member CreateIssuedTokenForSslBindingElement(IssuedSecurityTokenParameters, Boolean) Creates a symmetric security binding element that is configured to require client authentication based on an issued token and server authentication based on the server certificate.
Public method Static member CreateIssuedTokenOverTransportBindingElement Creates a security binding element configured to require SOAP security based client authentication using an issued token. This binding element requires the transport to provide server authentication and message protection (for example, HTTPS).
Public method Static member CreateKerberosBindingElement Creates a symmetric security binding element that is configured to require client authentication based on the client's Kerberos token.
Public method Static member CreateKerberosOverTransportBindingElement Creates a security binding element that is configured to require SOAP-security based client authentication using the client's Kerberos token. This binding element requires the transport to provide server authentication and message protection (for example, HTTPS).
Public method Static member CreateMutualCertificateBindingElement() Creates an asymmetric security binding element that is configured to require certificate-based client authentication as well as certificate-based server authentication.
Public method Static member CreateMutualCertificateBindingElement(MessageSecurityVersion) Creates an asymmetric security binding element that is configured to require certificate-based client authentication as well as certificate-based server authentication.
Public method Static member CreateMutualCertificateBindingElement(MessageSecurityVersion, Boolean) Creates an asymmetric security binding element that is configured to require certificate-based client authentication as well as certificate-based server authentication.
Public method Static member CreateMutualCertificateDuplexBindingElement() Creates an asymmetric security binding element that is configured to require certificate-based client authentication as well as certificate-based server authentication. This authentication mode can be used to secure duplex message-exchange patterns and requires the service to be configured with the client certificate out of band.
Public method Static member CreateMutualCertificateDuplexBindingElement(MessageSecurityVersion) Creates an asymmetric security binding element that is configured to require certificate-based client authentication as well as certificate-based server authentication. This authentication mode can be used to secure duplex message exchange patterns and requires the service to be configured with the client certificate out of band.
Public method Static member CreateSecureConversationBindingElement(SecurityBindingElement) Creates a symmetric security binding element that is configured to establish a secure conversation between the client and service. The security context token issued at the end of the secure conversation handshake is used to secure the messages. The bootstrap security binding element specifies how the secure conversation handshake messages are secured.
Public method Static member CreateSecureConversationBindingElement(SecurityBindingElement, Boolean) Creates a symmetric security binding element that is configured to establish a secure conversation between the client and service. The security context token issued at the end of the secure conversation handshake is used to secure the messages.
Public method Static member CreateSecureConversationBindingElement(SecurityBindingElement, Boolean, ChannelProtectionRequirements) Creates a symmetric security binding element that is configured to establish a secure conversation between the client and service. The security context token issued at the end of the secure conversation handshake is used to secure the messages. The bootstrap security binding element specifies how the secure conversation handshake messages are secured.
Public method Static member CreateSslNegotiationBindingElement(Boolean) Creates a symmetric security binding element that is configured to do SOAP-level SSL negotiation between the client and server, noting whether a client certificate is required.
Public method Static member CreateSslNegotiationBindingElement(Boolean, Boolean) Creates a symmetric security binding element that does SOAP SSL negotiation, noting whether a client certificate and cancellation is required.
Public method Static member CreateSspiNegotiationBindingElement() Creates a symmetric security binding element that does SOAP SSPI negotiation based on the Negotiate authentication package.
Public method Static member CreateSspiNegotiationBindingElement(Boolean) Creates a symmetric security binding element that does SOAP SSPI negotiation based on the Negotiate authentication package.
Public method Static member CreateSspiNegotiationOverTransportBindingElement() Creates a security binding element that is configured for client authentication based on SOAP SSPI negotiation using the Negotiate authentication package. The binding element requires the transport to provide server authentication and message protection (for example, HTTPS).
Public method Static member CreateSspiNegotiationOverTransportBindingElement(Boolean) Creates a security binding element that is configured for client authentication based on SOAP SSPI negotiation using the Negotiate authentication package. The binding element requires the transport to provide server authentication and message protection (for example, HTTPS).
Public method Static member CreateUserNameForCertificateBindingElement Creates a symmetric security binding element that is configured to require user name- and password-based client authentication and certificate-based server authentication. The created binding element requires the client to be configured with a service certificate that is out-of-band before opening a communication channel with a service.
Public method Static member CreateUserNameForSslBindingElement() Creates a symmetric security binding element that is configured to require user name- and password-based client authentication and certificate-based server authentication. The client authenticates the server using the SOAP-level SSL protocol.
Public method Static member CreateUserNameForSslBindingElement(Boolean) Creates a symmetric security binding element that is configured to require user name- and password-based client authentication and certificate-based server authentication. The client authenticates the server using the SOAP-level SSL protocol.
Public method Static member Supported by Portable Class Library CreateUserNameOverTransportBindingElement Creates a security binding element that is configured for client authentication based on a user name and password sent as part of the SOAP message. The binding element requires the transport to provide server authentication and message protection (for example, HTTPS).
Public method Supported by Portable Class Library Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Supported by Portable Class Library Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Supported by Portable Class Library GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method Supported by Portable Class Library GetProperty<T> Gets a specified object using the specified BindingContext. (Overrides BindingElement.GetProperty<T>(BindingContext).)
Public method Supported by Portable Class Library GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method Supported by Portable Class Library MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method Static member SetIssuerBindingContextIfRequired Internal system method.
Public method SetKeyDerivation Sets a value that indicates whether derived keys are required.
Public method ToString Returns a description of this class. (Overrides Object.ToString().)
Top

This class is the base class for the SOAP message security binding elements in . There are three implementations of this abstract class: SymmetricSecurityBindingElement, AsymmetricSecurityBindingElement, and TransportSecurityBindingElement. These implementations model the bindings defined in the WS-Security Policy specification.

A custom binding contains a collection of binding elements arranged in a specific order: the element that represents the top of the binding stack is added first, the next element down in the binding stack is added second, and so on.

To add this class to a binding, do the following:

  1. Create a BindingElementCollection.

  2. Create a custom binding element that is above this binding element in the binding stack, such as the optional TransactionFlowBindingElement and ReliableSessionBindingElement.

  3. Add these elements in the order previously described to the BindingElementCollection using the InsertItem method.

  4. Create an instance of a security binding element derived from SecurityBindingElement, such as AsymmetricSecurityBindingElement, SymmetricSecurityBindingElement, or TransportSecurityBindingElement.

  5. Add the derived security binding element to the collection.

  6. Add any additional custom binding elements to the collection, such as TcpTransportBindingElement.

For more information about using a SecurityBindingElement, see SecurityBindingElement Authentication Modes and How To: Create a Custom Binding Using the SecurityBindingElement.

Note Note

Once a SecurityBindingElement object is created, you should treat its properties as immutable. Calling set on some properties may have unpredictable effects: the binding may behave as if the property retained its old value, with a runtime failure being the only indication of an issue. Two properties known to behave this way are KeyType and MessageSecurityVersion. There may be other properties of which this is also true.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ