NetTcpBinding.PortSharingEnabled Property

Gets or sets a value that indicates whether TCP port sharing is enabled for the connection configured with this binding.

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

public bool PortSharingEnabled { get; set; }
/** @property */
public boolean get_PortSharingEnabled ()

/** @property */
public void set_PortSharingEnabled (boolean value)

public function get PortSharingEnabled () : boolean

public function set PortSharingEnabled (value : boolean)

Not applicable.

Property Value

true if TCP port sharing is enabled; otherwise, false. The default value is false.

Using this setting requires enabling the Windows Communication Foundation (WCF) TCP Port Sharing Service by changing its startup type to Manual or Automatic.

For information about the TCP Listener and how to start it, see TcpListener.

This example shows how to get the PortSharingEnabled value

bool portSharingEnabled = binding.PortSharingEnabled;

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: