Dave
2005-11-30 18:07:03 UTC
I'm using ldp.exe to connect to our global catalog in order to test my ad
search:
Base Dn: dc=abc,dc=mycompany,dc=com
Filter: (&(sAMAccountName=jsmith))
Scope: SubTree
Works fine, but how do I incorporate the 'Base Dn' attribute in the
DirectorySearcher below?
Here's my code:
DirectoryEntry entry = new DirectoryEntry("GC://mycompany.com", user, pass);
DirectorySearcher search = new DirectorySearcher(entry);
search.Filter = "(&(sAMAccountName=jsmith))";;
search.SearchScope = SearchScope.Subtree;
SearchResult result = search.FindOne();
Where does the Base Dn fit above? Thanks
search:
Base Dn: dc=abc,dc=mycompany,dc=com
Filter: (&(sAMAccountName=jsmith))
Scope: SubTree
Works fine, but how do I incorporate the 'Base Dn' attribute in the
DirectorySearcher below?
Here's my code:
DirectoryEntry entry = new DirectoryEntry("GC://mycompany.com", user, pass);
DirectorySearcher search = new DirectorySearcher(entry);
search.Filter = "(&(sAMAccountName=jsmith))";;
search.SearchScope = SearchScope.Subtree;
SearchResult result = search.FindOne();
Where does the Base Dn fit above? Thanks