Hi
I'm getting the following error in my code...
"Exception Details: System.Runtime.InteropServices.COMException: The server
does not support the requested critical extension"
Here's the function...
int listc;
string cs;
DirectoryEntry entry = new DirectoryEntry("LDAP://" +
ConfigurationSettings.AppSettings.Get("System_Acti veDirPath"));
DirectorySearcher mySearcher = new DirectorySearcher(entry);
mySearcher.Filter = ("(objectClass=user)");
mySearcher.Sort = new SortOption("FirstName", SortDirection.Ascending);
listc = 1;
foreach(SearchResult resEnt in mySearcher.FindAll())
{
try
{
DirectoryEntry de = resEnt.GetDirectoryEntry();
if((de.Properties["DisplayName"].Value != null) &&
(de.Properties["givenName"].Value != null) && (de.Properties["sn"].Value !=
null))
{
ListItem adItem = new ListItem();
adItem.Text = de.Properties["givenName"].Value.ToString() + " " +
de.Properties["sn"].Value.ToString();
adItem.Value = de.Properties["sAMaccountname"].Value.ToString();
ddlDartsContact.Items.Insert(listc, adItem);
adItem = null;
listc++;
}
}
finally {}
I *think* the problem is to do with the line
mySearcher.Sort = new SortOption("FirstName", SortDirection.Ascending);
Any help/ideas as to what's wrong appreciated!
Cheers
Dan