NetTcpBinding Constructor (SecurityMode, Boolean)

 

Initializes a new instance of the NetTcpBinding class with the type of security used specified and with a value that indicates whether reliable sessions are explicitly enabled.

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

public:
NetTcpBinding(
	SecurityMode securityMode,
	bool reliableSessionEnabled
)

Parameters

securityMode
Type: System.ServiceModel::SecurityMode

The SecurityMode value that specifies the type of security used with the binding.

reliableSessionEnabled
Type: System::Boolean

true if reliable sessions are enabled; otherwise, false.

Use this constructor when you want to configure the security and enable reliable sessions.

This example shows how to create a NetTcpBinding using the securityMode and reliableSessionEnabled parameters.

NetTcpBinding bSecurityReliable = new NetTcpBinding(SecurityMode.Transport, true);

.NET Framework
Available since 3.0
Return to top
Show: