Cancels the invitation that was sent with the InviteAsync method.
Assembly: System.Net (in System.Net.dll)
Calling this method guarantees the system will cease to wait for a PeerInvitationResponse from the peer associated with the InviteAsync request.
Multiple invitations may be outstanding at any given time. If the method is called when an asynchronous operation identified by the userToken is not in existence, an exception is thrown. The userToken object must be provided since it is used to track a specific asynchronous call. This host application-supplied object is unique for each invite request.
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.