Windows apps
Collapse the table of content
Expand the table of content
Information
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.

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:
property SecurityMode Mode {
	SecurityMode get();
	void set(SecurityMode value);
}

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.

Exception Condition
ArgumentOutOfRangeException

The value is not defined.

The security mode determines the type of security required by an endpoint. Windows Communication Foundation (WCF) 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);

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