M
mingjing
Hello ,everyone:
I want to search domain user in active directory uses those code ,but
the result not return domain user information ,
but only return the domain computer ,how can I resolve the problem!
System.DirectoryServices.DirectoryEntry entry =
new
System.DirectoryServices.DirectoryEntry("LDAP://silan.com/DC=silan,DC=com");
System.DirectoryServices.DirectorySearcher mySearcher = new
System.DirectoryServices.DirectorySearcher(entry);
mySearcher.Filter = ("(anr=chen)");
string s = "";
foreach(System.DirectoryServices.SearchResult result in
mySearcher.FindAll())
{
s = result.GetDirectoryEntry().Path;
Console.WriteLine(s );
}
I want to search domain user in active directory uses those code ,but
the result not return domain user information ,
but only return the domain computer ,how can I resolve the problem!
System.DirectoryServices.DirectoryEntry entry =
new
System.DirectoryServices.DirectoryEntry("LDAP://silan.com/DC=silan,DC=com");
System.DirectoryServices.DirectorySearcher mySearcher = new
System.DirectoryServices.DirectorySearcher(entry);
mySearcher.Filter = ("(anr=chen)");
string s = "";
foreach(System.DirectoryServices.SearchResult result in
mySearcher.FindAll())
{
s = result.GetDirectoryEntry().Path;
Console.WriteLine(s );
}