DirectoryEntry de = new DirectoryEntry("LDAP://myldapserver/o=my1sto,o=my2ndo,ou=People");
de.Username = "user";
de.Password = "password";
DirectorySearcher searcher = new DirectorySearcher(de);
searcher.Filter = "(uid=" + netid + ")";
searcher.SearchScope = SearchScope.Subtree;
// I want to see if the given user has the pdsRole attribute set to a specific value - lets sat "TEST"
searcher.PropertiesToLoad.Add("pdsRole");
SearchResult oResult = searcher.FindOne();
// its from here that I get confused
// am I using the SearchResult object class right?
// How do I extract values from it and check them
ASKER
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.
TRUSTED BY
Open in new window