NetPeerTcpBinding.ListenIPAddress Property

Gets or sets the IP address used for listening by the local peer node.

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

public IPAddress ListenIPAddress { get; set; }
/** @property */
public IPAddress get_ListenIPAddress ()

/** @property */
public void set_ListenIPAddress (IPAddress value)

public function get ListenIPAddress () : IPAddress

public function set ListenIPAddress (value : IPAddress)

Not applicable.

Property Value

A String value that contains the well-formed IPv4 or IPv6 address upon which the local peer node is listening.

Exception typeCondition

ArgumentException

The provided address is invalid or incorrectly formed.

If this property is not set, or is set to a null reference (Nothing in Visual Basic) or Empty, the associated PeerNode listens on all global addresses (both IPv4 and IPv6) configured for the local machine.

If a valid unicast IP address is specified for this property, then the associated PeerNode object listens on that address. IPv4 and IPv6 wildcard addresses are not considered valid.

If a non-a null reference (Nothing in Visual Basic) IP address string is specified for this property in conjunction with PnrpPeerResolverBindingElement, then the IP address must be associated with a physical interface rather than a virtual one.

ListenIPAddress must be set for ad-hoc networks in order to register with the default peer resolver (PNRP). If this property is specified in conjunction with PnrpPeerResolverElement (the default peer resolver), then the IP address must belong to a physical network interface rather than a virtual one (such as a tunneling interface). This is because PNRP only publishes within clouds corresponding to physical interfaces. By setting this property to null, all global addresses are published in the global PNRP cloud.

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: