PeerContact.Invite Method (PeerEndPoint)

Sends an invitation to a specific endpoint to join into peer collaboration with the sender of the invitation.

Namespace:  System.Net.PeerToPeer.Collaboration
Assembly:  System.Net (in System.Net.dll)

public PeerInvitationResponse Invite(
	PeerEndPoint peerEndPoint
)

Parameters

peerEndPoint
Type: System.Net.PeerToPeer.Collaboration.PeerEndPoint

The endpoint to receive the invitation.

Return Value

Type: System.Net.PeerToPeer.Collaboration.PeerInvitationResponse
A PeerInvitationResponse from the peer endpoint who received the invitation.

ExceptionCondition
ArgumentNullException

PeerEndPoint cannot be null.

ObjectDisposedException

The PeerEndPoint object has been disposed.

PeerToPeerException
  • Unable to complete Invite operation.

  • The currently executing application is not registered with the peer collaboration infrastructure.

  • EndPoint specified by PeerEndPoint object is not valid.

The caller is not required to sign-in to the System.Net.PeerToPeer.Collaboration infrastructure for this method to complete successfully. A PeerInvitationResponse from the invitee is not the same as the invitee accepting the invitation to collaborate. If an invitation is sent to a remote peer that has not installed the application, the invitation is automatically declined.

Notes to Callers

Calling this method requires a PermissionState of Unrestricted. This state is created when the peer collaboration session begins.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft