Expand Minimize
0 out of 1 rated this helpful - Rate this topic

SecurityMode Enumeration

Determines the security settings for a binding.

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)
public enum SecurityMode
Member nameDescription
Supported in .NET for Windows Store appsNoneSecurity is disabled.
Supported in .NET for Windows Store appsTransportSecurity is provided using a secure transport (for example, HTTPS).
Supported in .NET for Windows Store appsMessageSecurity is provided using SOAP message security.
Supported in .NET for Windows Store appsTransportWithMessageCredentialA 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 about Windows 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;

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

.NET for Windows Store apps

Supported in: Windows 8

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.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.