WSHttpBinding.CreateBindingElements Method ()

 

Returns an ordered collection of binding elements contained in the current binding.

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

public override BindingElementCollection CreateBindingElements()

Return Value

Type: System.ServiceModel.Channels.BindingElementCollection

The BindingElementCollection that contains the ordered stack of binding elements described by the WSHttpBinding binding.

Exception Condition
InvalidOperationException

The transport security mode set cannot provide the reliable session that has been enabled.

The order of the binding elements is important. It reflects the order in which the protocol and transport channels are constructed and stacked.

The following example shows how to obtain the BindingElementCollection that contains the ordered stack of binding elements described by WSHttpBinding binding.

WSHttpBinding wsHttpBinding = new WSHttpBinding();
BindingElementCollection beCollection = wsHttpBinding.CreateBindingElements();

.NET Framework
Available since 3.0
Return to top
Show: