Export (0) Print
Expand All

SecurityBindingElement Class

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

Namespace:  System.ServiceModel.Channels
Assemblies:   System.ServiceModel (in System.ServiceModel.dll)
  System.ServiceModel.Security (in System.ServiceModel.Security.dll)

public ref class SecurityBindingElement abstract : public BindingElement

The SecurityBindingElement type exposes the following members.

  NameDescription
Public propertyAllowInsecureTransportGets or sets a value that indicates whether mixed-mode secured messages can be sent over an unsecured transport such as HTTP.
Public propertyDefaultAlgorithmSuiteGets or sets the message encryption and key-wrap algorithms.
Public propertyEnableUnsecuredResponseGets or sets a value that indicates whether WCF can send and receive unsecured responses to secured requests.
Public propertySupported in .NET for Windows Store appsEndpointSupportingTokenParametersGets the endpoint that supports token parameters.
Public propertySupported by Portable Class LibrarySupported in .NET for Windows Store appsIncludeTimestampGets or sets a value that indicates whether time stamps are included in each message.
Public propertyKeyEntropyModeGets or sets the source of entropy used to create keys.
Public propertySupported by Portable Class LibrarySupported in .NET for Windows Store appsLocalClientSettingsGets the binding properties specific to local security settings used by the client.
Public propertyLocalServiceSettingsGets the binding properties specific to local security settings used by the service.
Public propertySupported in .NET for Windows Store appsMessageSecurityVersionGets or sets the message security version.
Public propertyOperationSupportingTokenParametersGets the collection of operation supporting token parameters.
Public propertyOptionalEndpointSupportingTokenParametersGets the optional supporting token parameters for the service endpoint.
Public propertyOptionalOperationSupportingTokenParametersGets the collection of optional operation supporting token parameters.
Public propertyProtectTokensGets or sets whether the security binding element protects tokens.
Public propertySupported in .NET for Windows Store appsSecurityHeaderLayoutGets or sets the ordering of the elements in the security header for this binding.
Top

  NameDescription
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsBuildChannelFactory<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 methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsBuildChannelFactoryCore<TChannel>When implemented, creates a channel factory of a specified type.
Public methodBuildChannelListener<TChannel>Creates a channel listener based on the SecurityBindingElement settings and the binding context passed in. (Overrides BindingElement::BuildChannelListener<TChannel>(BindingContext).)
Protected methodBuildChannelListenerCore<TChannel>When implemented, creates a channel listener of a specified type.
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsCanBuildChannelFactory<TChannel>Determines whether a channel factory of the specified type can be built. (Overrides BindingElement::CanBuildChannelFactory<TChannel>(BindingContext).)
Public methodCanBuildChannelListener<TChannel>Determines whether a channel listener of the specified type can be built. (Overrides BindingElement::CanBuildChannelListener<TChannel>(BindingContext).)
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsCloneWhen overridden in a derived class, returns a copy of the binding element object. (Inherited from BindingElement.)
Public methodStatic memberCreateAnonymousForCertificateBindingElementCreates a symmetric security binding element that is configured for anonymous client authentication and certificate-based server authentication.
Public methodStatic memberCreateCertificateOverTransportBindingElement()Creates a security binding element that expects clients to do certificate-based authentication using SOAP message security.
Public methodStatic memberCreateCertificateOverTransportBindingElement(MessageSecurityVersion)Creates a security binding element that expects clients to do certificate-based authentication using SOAP message security.
Public methodStatic memberCreateCertificateSignatureBindingElementCreates 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 methodStatic memberCreateIssuedTokenBindingElementCreates a symmetric security binding element that is configured to require client authentication using a symmetric-key based issued token.
Public methodStatic memberCreateIssuedTokenForCertificateBindingElementCreates 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 methodStatic memberCreateIssuedTokenForSslBindingElement(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 methodStatic memberCreateIssuedTokenForSslBindingElement(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 methodStatic memberCreateIssuedTokenOverTransportBindingElementCreates 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 methodStatic memberCreateKerberosBindingElementCreates a symmetric security binding element that is configured to require client authentication based on the client's Kerberos token.
Public methodStatic memberCreateKerberosOverTransportBindingElementCreates 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 methodStatic memberCreateMutualCertificateBindingElement()Creates an asymmetric security binding element that is configured to require certificate-based client authentication as well as certificate-based server authentication.
Public methodStatic memberCreateMutualCertificateBindingElement(MessageSecurityVersion)Creates an asymmetric security binding element that is configured to require certificate-based client authentication as well as certificate-based server authentication.
Public methodStatic memberCreateMutualCertificateBindingElement(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 methodStatic memberCreateMutualCertificateDuplexBindingElement()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 methodStatic memberCreateMutualCertificateDuplexBindingElement(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 methodStatic memberSupported in .NET for Windows Store appsCreateSecureConversationBindingElement(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 methodStatic memberCreateSecureConversationBindingElement(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 methodStatic memberCreateSecureConversationBindingElement(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 methodStatic memberCreateSslNegotiationBindingElement(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 methodStatic memberCreateSslNegotiationBindingElement(Boolean, Boolean)Creates a symmetric security binding element that does SOAP SSL negotiation, noting whether a client certificate and cancellation is required.
Public methodStatic memberCreateSspiNegotiationBindingElement()Creates a symmetric security binding element that does SOAP SSPI negotiation based on the Negotiate authentication package.
Public methodStatic memberCreateSspiNegotiationBindingElement(Boolean)Creates a symmetric security binding element that does SOAP SSPI negotiation based on the Negotiate authentication package.
Public methodStatic memberCreateSspiNegotiationOverTransportBindingElement()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 methodStatic memberCreateSspiNegotiationOverTransportBindingElement(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 methodStatic memberCreateUserNameForCertificateBindingElementCreates 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 methodStatic memberCreateUserNameForSslBindingElement()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 methodStatic memberCreateUserNameForSslBindingElement(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 methodStatic memberSupported by Portable Class LibrarySupported in .NET for Windows Store appsCreateUserNameOverTransportBindingElementCreates 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 methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsGetProperty<T>Gets a specified object using the specified BindingContext. (Overrides BindingElement::GetProperty<T>(BindingContext).)
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodStatic memberSetIssuerBindingContextIfRequiredInfrastructure. Sets the key for the token requirement property whose value is the BindingContext used to talk to the issuing party if the requirement is for an issued token.
Public methodSetKeyDerivationSets a value that indicates whether derived keys are required.
Public methodSupported in .NET for Windows Store appsToStringReturns a description of this class. (Overrides Object::ToString().)
Top

This class is the base class for the SOAP message security binding elements in WCF. 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.

NoteNote

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.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

.NET for Windows Store apps

Supported in: Windows 8

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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.
Show:
© 2014 Microsoft