PrincipalContext PrincipalContext PrincipalContext PrincipalContext Class

Definition

Encapsulates the server or domain against which all operations are performed, the container that is used as the base of those operations, and the credentials used to perform the operations.

public ref class PrincipalContext : IDisposable
[System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)]
public class PrincipalContext : IDisposable
type PrincipalContext = class
    interface IDisposable
Public Class PrincipalContext
Implements IDisposable
Inheritance
PrincipalContextPrincipalContextPrincipalContextPrincipalContext
Attributes
Implements

Remarks

For search operations, the principal context defines the search base, and for insert operations the context defines the container into which the object is inserted.

Constructors

PrincipalContext(ContextType) PrincipalContext(ContextType) PrincipalContext(ContextType) PrincipalContext(ContextType)

Initializes a new instance of the PrincipalContext class with the specified context type.

PrincipalContext(ContextType, String) PrincipalContext(ContextType, String) PrincipalContext(ContextType, String) PrincipalContext(ContextType, String)

Initializes a new instance of the PrincipalContext class with the specified context type and name.

PrincipalContext(ContextType, String, String) PrincipalContext(ContextType, String, String) PrincipalContext(ContextType, String, String) PrincipalContext(ContextType, String, String)

Initializes a new instance of the PrincipalContext class with the specified context type, name, and container.

PrincipalContext(ContextType, String, String, ContextOptions) PrincipalContext(ContextType, String, String, ContextOptions) PrincipalContext(ContextType, String, String, ContextOptions) PrincipalContext(ContextType, String, String, ContextOptions)

Initializes a new instance of the PrincipalContext class with the specified context type, name, container, and context options.

PrincipalContext(ContextType, String, String, ContextOptions, String, String) PrincipalContext(ContextType, String, String, ContextOptions, String, String) PrincipalContext(ContextType, String, String, ContextOptions, String, String) PrincipalContext(ContextType, String, String, ContextOptions, String, String)

Initializes a new instance of the PrincipalContext class with the specified context type, name, container, context options, username, and password.

PrincipalContext(ContextType, String, String, String) PrincipalContext(ContextType, String, String, String) PrincipalContext(ContextType, String, String, String) PrincipalContext(ContextType, String, String, String)

Initializes a new instance of the PrincipalContext class with the specified context type, name, username, and password.

PrincipalContext(ContextType, String, String, String, String) PrincipalContext(ContextType, String, String, String, String) PrincipalContext(ContextType, String, String, String, String) PrincipalContext(ContextType, String, String, String, String)

Initializes a new instance of the PrincipalContext class with the specified context type, name, container, username, and password.

Properties

ConnectedServer ConnectedServer ConnectedServer ConnectedServer

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

Container Container Container Container

Gets the value specified in the container parameter in the constructor.

ContextType ContextType ContextType ContextType

Gets the context type that specifies the type of store for the principal context.

Name Name Name Name

Gets the value specified as the name parameter in the constructor.

Options Options Options Options

Gets the options specified in the contextOptions parameter of the constructor.

UserName UserName UserName UserName

Gets the value specified in the username parameter in the constructor.

Methods

Dispose() Dispose() Dispose() Dispose()

Disposes the current instance of the PrincipalContext object.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
ValidateCredentials(String, String) ValidateCredentials(String, String) ValidateCredentials(String, String) ValidateCredentials(String, String)

Creates the connections to the server and returns a Boolean value that specifies whether the specified username and password are valid.

ValidateCredentials(String, String, ContextOptions) ValidateCredentials(String, String, ContextOptions) ValidateCredentials(String, String, ContextOptions) ValidateCredentials(String, String, ContextOptions)

Creates the connections to the server and returns a Boolean value that specifies whether the specified user name and password are valid. This method performs fast credential validation of the username and password.

Applies to

See Also