Export (0) Print
Expand All

PeerCollaboration.SignIn Method

Signs the peer into the collaboration infrastructure with the specified PeerScope.

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

public static void SignIn(
	PeerScope peerScope
)

Parameters

peerScope
Type: System.Net.PeerToPeer.Collaboration.PeerScope

The scope the peer is using to join the PeerCollaboration activity.

ExceptionCondition
ArgumentException

peerScope is set to None.

ArgumentOutOfRangeException

The peerScope parameter contains an invalid enumeration value.

PeerToPeerException

The SignIn operation could not be completed.

Display names are not necessarily unique. Users should verify the identity of the person using the display name by e-mail, phone, or in person before accepting a collaboration invitation.

This function signs the users into the Collaboration Infrastructure.

Access to this method requires a PermissionState of Unrestricted. This state is created when the Peer collaboration session begins.

The following code example illustrates how to sign the users into the Collaboration infrastructure.

//This function signs the users into the Collaboration Infrastructure. 
public static bool PeerCollabSignin()
{
    bool result = false;
    try
    {
        PeerCollaboration.SignIn(PeerScope.All);
        result = true;
    }
    catch(Exception ex)
    {
        Console.WriteLine("Error signing in: {0}", ex.Message);
    }
    return result;
}

.NET Framework

Supported in: 4.5.2, 4.5.1, 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.

Show:
© 2014 Microsoft