PrincipalContext.ConnectedServer Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the name of the server to which the principal context is connected.

Namespace:   System.DirectoryServices.AccountManagement
Assembly:  System.DirectoryServices.AccountManagement (in System.DirectoryServices.AccountManagement.dll)

member ConnectedServer : string with get

Property Value

Type: System.String

The name of the server to which the principal context is connected or null if the principal context is not connected to a server.

When the context type is Domain, this property returns the name of the domain controller or application directory instance. When the context type is Machine, this property returns the machine name.

.NET Framework
Available since 3.5

System.DirectoryServices.AccountManagement
PrincipalContext Class
System.DirectoryServices.AccountManagement Namespace Overview

Return to top
Show: