I'm currently trying to authenticate via Active Directory Services using the PrincipalContext class. I would like to have my application authenticate to the Domain using Sealed and SSL contexts. In order to do this, I have to use the following constructor of PrincipalContext (link to MSDN page):
public PrincipalContext(
ContextType contextType,
string name,
string container,
ContextOptions options
)
Specifically, I'm using the constructor as so:
PrincipalContext domainContext = new PrincipalContext(
ContextType.Domain,
domain,
container,
ContextOptions.Sealing | ContextOptions.SecureSocketLayer);
MSDN says about "container":
The container on the store to use as the root of the context. All queries are performed under this root, and all inserts are performed into this container. For Domain and ApplicationDirectory context types, this parameter is the distinguished name (DN) of a container object.
What is the DN of a container object? How do I find out what my container object is? Can I query the Active Directory (or LDAP) server for this?
ValidateCredentials
. Thanks! – Northwest