Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
 SecurityMode Enumeration
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
SecurityMode Enumeration

Determines the security settings for a binding.

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)
Visual Basic (Declaration)
Public Enumeration SecurityMode
Visual Basic (Usage)
Dim instance As SecurityMode
C#
public enum SecurityMode
Visual C++
public enum class SecurityMode
JScript
public enum SecurityMode
Member nameDescription
NoneSecurity is disabled.
TransportSecurity is provided using a secure transport (for example, HTTPS).
MessageSecurity is provided using SOAP message security.
TransportWithMessageCredentialA 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.

Visual Basic
Dim b As New WSHttpBinding()
b.Security.Mode = SecurityMode.Transport
C#
WSHttpBinding b = new WSHttpBinding();
b.Security.Mode = SecurityMode.Transport;

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker