I am using C# in VS2008 in a WinXP/Win7/WinServer2003 environment.
Is there a way to search the active directory without involving LDAP?
I have users created in Active Directory but when I search using this
DirectorySearcher dirSearcher = new DirectorySearcher(
new DirectoryEntry("LDAP://DC=kmmnet,DC=com"),
"(objectClass=user)",
new string[] { "sAMAccountName", "displayname", "givenname", "sn" });
foreach (SearchResult s in dirSearcher.FindAll())
{
System.DirectoryServices.PropertyCollection p = s.GetDirectoryEntry().Properties;
}
it cannot find some of the users.
thanks Shawn