PrincipalContext.ConnectedServer 属性
定义
获取主体上下文连接到的服务器的名称。Gets the name of the server to which the principal context is connected.
public:
property System::String ^ ConnectedServer { System::String ^ get(); };
public string ConnectedServer { get; }
member this.ConnectedServer : string
Public ReadOnly Property ConnectedServer As String
属性值
主体上下文连接到的服务器的名称,或者 null ,如果主体上下文未连接到服务器,则为。The name of the server to which the principal context is connected or null if the principal context is not connected to a server.
注解
当上下文类型为时 Domain ,此属性返回域控制器或应用程序目录实例的名称。When the context type is Domain, this property returns the name of the domain controller or application directory instance. 当上下文类型为时 Machine ,此属性将返回计算机名称。When the context type is Machine, this property returns the machine name.