Mode Property
Collapse the table of content
Expand the table of content

NetTcpSecurity.Mode Property

Gets or sets whether message-level security and transport-level security are used by an endpoint configured with a NetTcpBinding.

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

public SecurityMode Mode { get; set; }

Property Value

Type: System.ServiceModel.SecurityMode
A value of the SecurityMode that indicates whether message-level security or transport-level security is used by an endpoint. The default value is Transport.


The value is not defined.

The security mode determines the type of security required by an endpoint. security offers a variety of mechanisms with which to secure the transfer of messages that are configured with the system-provided bindings. Each of the bindings supports a subset of these security modes. The mode determines the mechanisms by which message transfer security functions (integrity, confidentiality and authentication) are required.

NetTcpSecurity security = binding.Security;
Console.WriteLine("\tSecurity Mode: {0}", security.Mode);

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Community Additions

© 2015 Microsoft