The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SecurityMode Enumeration


Determines the security settings for a binding.

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

public enum SecurityMode

Member nameDescription

Security is provided using SOAP message security.


Security is disabled.


Security is provided using a secure transport (for example, HTTPS).


A secure transport (for example, HTTPS) provides integrity, confidentiality, and authentication while SOAP message security provides client authentication.

Any ProtectionLevel settings of a transport are ignored if the SecurityMode is set to None. For more information about the ProtectionLevel property, see Understanding Protection Level.

For more information aboutWindows Communication Foundation (WCF) security and how this property affects general security features, see Securing Services and Programming WCF Security. For more information about the transport mode, see Transport Security.

Note that if you choose TransportWithMessageCredential, then the value set in HttpClientCredentialType or TcpClientCredentialType is ignored.

The following example sets the Mode property of the WSHttpBinding. For more examples, see How to: Set the Security Mode.

WSHttpBinding b = new WSHttpBinding();
b.Security.Mode = SecurityMode.Transport;

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Return to top
© 2015 Microsoft