Hi.

I am using DirectoryEntry(string, string, string) to connect to Active Directory. The user name I used is in LDAP format. password is provided by AD team. May someone tells me what's the format for user name and password.

thanks.

You can create your new DirectoryEntry object on the fly and pass it to the search object.

DirectorySearcher search = new DirectorySearcher(new DirectoryEntry("LDAP://servername.net", "administrator", "password123$"));
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.