Export (0) Print
Expand All
Expand Minimize

SecurityMode Enumeration

Determines the security settings for a binding.

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

public enum SecurityMode
public enum SecurityMode
public enum SecurityMode

 Member nameDescription
MessageSecurity is provided using SOAP message security. 
NoneSecurity is disabled. 
TransportSecurity is provided using a secure transport (for example, HTTPS). 
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.

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2015 Microsoft