Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
System.Net.PeerToPeer Namespace

The System.Net.PeerToPeer namespace provides access to peer networking functionality.

How peers discover each other and resolve identifiers is complicated by transient connectivity and the lack of access to address records such as the Domain Name System (DNS). The Windows Peer-to-Peer Infrastructure solves this problem with a name resolution and peer discovery scheme called PNRP.

Peer Name Resolution Protocol (PNRP) provides a name resolution mechanism for peer-to-peer networks. PNRP is designed to resolve a name to a network IPEndPoint in a completely peer-to-peer manner.

Basic PNRP functionality is provided in the System.Net.PeerToPeer namespace classes. They provide the ability to create a peer and register it in a Cloud of peers. They also provide the ability to resolve a PeerName to its network endpoint, TCP port, cloud, or other address identifier(s).

Advanced functionality for peer-to-peer networking is provided in the System.Net.PeerToPeer.Collaboration namespace.

In Windows Vista, PNRP ships as a service that is started on demand by applications. In addition, there is a PNRP machine registration service that can be manually enabled by applications or users if they want to publish machine names for remote connections and communications.

PNRP version 1 was included in Windows XP Service Pack 2 (SP2), Windows XP Professional x64 Edition, and Windows XP with Service Pack 1 (SP1) and the Advanced Networking Pack for Windows XP.

In addition, there is a PNRP machine registration service which can be manually enabled by applications/users if there is interest in publishing machine names for remote connection and communication.

  ClassDescription
Public classCloud Specifies the values that define a Peer Cloud object.
Public classCloudCollection Represents a container for CloudCollection elements. This class cannot be inherited.
Public classPeerName Specifies the values that define a peer-to-peer PeerName object. A peer name is typically a string used to identify a peer resource.
Public classPeerNameRecord Defines the set of values that form a peer name record object. This record includes items such as the peer name and the collection of endpoints with which it communicates. Peer name records are used to define the individual peer nodes within a Cloud.
Public classPeerNameRecordCollection Represents a container for PeerNameRecord elements.
Public classPeerNameRegistration Registers a PeerName in a Cloud or set of clouds.
Public classPeerNameResolver Specifies the values that resolve a PeerName to a PeerNameRecord using the PNRP Namespace Provider API protocol.
Public classPeerToPeerException Represents the exceptions that are thrown when an error is raised by the Peer-to-Peer Infrastructure.
Public classPnrpPermission Specifies the values that are used in System.Net.PeerToPeer object permissions.
Public classPnrpPermissionAttribute Allows security actions for PnrpPermission to be applied to code using declarative security.
Public classResolveCompletedEventArgs Used in conjunction with the ResolveCompleted event, which is signaled when a resolve request for a specific PeerName has completed.
Public classResolveProgressChangedEventArgs Used in conjunction with signaling the ResolveProgressChanged event. It is signaled whenever a PeerNameRecord object is found in response to a ResolveAsync operation on a specific PeerName.
  EnumerationDescription
Public enumerationPeerNameType Defines the type of PeerName to create. A peer name is either secured or unsecured. A secured peer name provides a proof of ownership of the name. An unsecured peer name has no identity associated.
Public enumerationPnrpScope Specifies the different scopes of a PNRP cloud.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Does this work in Windows XP      TheNakedPirate   |   Edit   |   Show History
I have enabled Peer to Peer through the control panel.

This code

PeerName peerName = new PeerName("SuperWebServer", PeerNameType.Secured);


gives me this runtime error .

An unhandled exception of type 'System.EntryPointNotFoundException' occurred in System.Net.dll

Additional information: Unable to find an entry point named 'PeerIdentityGetDefault' in DLL 'p2p.dll'.

An example that works would be nice


Tags What's this?: Add a tag
Flag as ContentBug
XP Support      dfiala   |   Edit   |   Show History
Yes,
It does work in XP, but you need XP SP2 and the proper version of PNRP installed.

Check out http://support.microsoft.com/kb/920342.
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker