Hello I am trying to write a litte program which let users search für other users with an LDAP connection.
It works fine with some search operations but it takes a very long time to "open" the searchresult object, it produces an COMException with some querys, others work fine. i have no idea why this takes this much time. if i debug step by step the .FindAll() works fine but the message box takes about 3 seconds or produces an exception. the result is limited to 300 results by the server.
my problem is that the Searchresultcol lection object opens very slowly or produces an exception. maybe someone can help me out?
thanks in advance.
System.Director yServices.Direc toryEntry entry = new System.Director yServices.Direc toryEntry(ldapc on);
entry.Authentic ationType = AuthenticationT ypes.ReadonlySe rver;
System.Director yServices.Direc torySearcher mysearcher = new System.Director yServices.Direc torySearcher(en try);
mysearcher.Prop ertiesToLoad.Ad d("sn");
mysearcher.Prop ertiesToLoad.Ad d("gn");
mysearcher.Prop ertiesToLoad.Ad d("department") ;
mysearcher.Prop ertiesToLoad.Ad d("l");
mysearcher.Prop ertiesToLoad.Ad d("c");
mysearcher.Prop ertiesToLoad.Ad d("mail");
mysearcher.Prop ertiesToLoad.Ad d("tcgid");
mysearcher.Size Limit = 300;
mysearcher.Filt er = filter;
SearchResultCol lection results = mysearcher.Find All();
MessageBox.Show (results.Count. ToString());
foreach (SearchResult rs in results)
{
It works fine with some search operations but it takes a very long time to "open" the searchresult object, it produces an COMException with some querys, others work fine. i have no idea why this takes this much time. if i debug step by step the .FindAll() works fine but the message box takes about 3 seconds or produces an exception. the result is limited to 300 results by the server.
my problem is that the Searchresultcol lection object opens very slowly or produces an exception. maybe someone can help me out?
thanks in advance.
System.Director yServices.Direc toryEntry entry = new System.Director yServices.Direc toryEntry(ldapc on);
entry.Authentic ationType = AuthenticationT ypes.ReadonlySe rver;
System.Director yServices.Direc torySearcher mysearcher = new System.Director yServices.Direc torySearcher(en try);
mysearcher.Prop ertiesToLoad.Ad d("sn");
mysearcher.Prop ertiesToLoad.Ad d("gn");
mysearcher.Prop ertiesToLoad.Ad d("department") ;
mysearcher.Prop ertiesToLoad.Ad d("l");
mysearcher.Prop ertiesToLoad.Ad d("c");
mysearcher.Prop ertiesToLoad.Ad d("mail");
mysearcher.Prop ertiesToLoad.Ad d("tcgid");
mysearcher.Size Limit = 300;
mysearcher.Filt er = filter;
SearchResultCol lection results = mysearcher.Find All();
MessageBox.Show (results.Count. ToString());
foreach (SearchResult rs in results)
{
Comment