R
Rudy Ko
To All,
I'm trying to sort from a DirectorySearcher, but got "Incorrect
function" exception. Do you have a hint? The code is as following:
System.DirectoryServices.SortOption sortOption = new
System.DirectoryServices.SortOption("cn",
System.DirectoryServices.SortDirection.Ascending);
DirectorySearcher mySearcher = new DirectorySearcher(directoryWC);
mySearcher.Filter = "ou=people";
mySearcher.Sort = sortOption;
DirectoryEntry users=mySearcher.FindOne().GetDirectoryEntry();
If don't specify "sort option", the above code works.
Thanks for all the help!!!
Regards,
Rudy
I'm trying to sort from a DirectorySearcher, but got "Incorrect
function" exception. Do you have a hint? The code is as following:
System.DirectoryServices.SortOption sortOption = new
System.DirectoryServices.SortOption("cn",
System.DirectoryServices.SortDirection.Ascending);
DirectorySearcher mySearcher = new DirectorySearcher(directoryWC);
mySearcher.Filter = "ou=people";
mySearcher.Sort = sortOption;
DirectoryEntry users=mySearcher.FindOne().GetDirectoryEntry();
If don't specify "sort option", the above code works.
Thanks for all the help!!!
Regards,
Rudy