MessageContractAttribute.ProtectionLevel Property


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

Gets or sets a value that specified whether the message must be encrypted, signed, or both.

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

public ProtectionLevel ProtectionLevel { get; set; }

Property Value

Type: System.Net.Security.ProtectionLevel

One of the ProtectionLevel values. The default is None.

Exception Condition

The value passed to the property when the setting is not one of the ProtectionLevel values.

For details about protection levels and their assumptions and scopes, see Understanding Protection Level.

.NET Framework
Available since 3.0
Return to top