WSHttpSecurity.Mode Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Specifies the message SecurityMode for this binding.

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

public SecurityMode Mode { get; set; }

Property Value

Type: System.ServiceModel.SecurityMode

The SecurityMode for this binding. The default is Message.

Exception Condition

The value of the Mode set is not defined.

This property determines whether the settings from the Transport and/or Message property buckets may or may not become effective.

The following code sets this property.

WSHttpBinding myBinding = new WSHttpBinding();
myBinding.Security.Mode = SecurityMode.Message;

.NET Framework
Available since 3.0
Return to top