C# application - Virtual View List with DirectoryVirtualListView - "The server does not support the requested critical extension"
c# application implementing virtual view list directoryvirtuallistview on ad/ windows 2008 r2. following piece of code:
public class directoryitem { public string dislayname { get; set; } public string cn { get; set; } public string firstname { ; set;} public string lastname { get; set; } }
public class ldapsearcher { string adspath = "ldap://dc=capulet,dc=com"; string username = "capulet\\administrator"; string password = "1111"; int offset = 5; public int total = 0; directoryentry searchroot=null; public ldapsearcher() { searchroot = new directoryentry( adspath, username, password, authenticationtypes.secure ); } public ldapsearcher(string adspath, string username, string password) { this.adspath = adspath; this.username = username; this.password = password; searchroot = new directoryentry( adspath, username, password, authenticationtypes.secure ); } public list<directoryitem> findvlv(int start, int pagesize, string sortexpression, string direction, string query ) { list<directoryitem> db = new list<directoryitem>(); using (directorysearcher ds = new directorysearcher(searchroot, query)) { ds.sort = new sortoption( sortexpression, sortdirection.descending ); ds.virtuallistview = new directoryvirtuallistview(0, pagesize-1, start+1 ); ds.propertiestoload.add("displayname"); ds.propertiestoload.add("cn"); using (searchresultcollection src = ds.findall()) { //console.writeline("found {0}", src.count); foreach (searchresult sr in src) { directoryitem item = new directoryitem(); item.cn = sr.properties["cn"][0].tostring(); item.dislayname = sr.properties["displayname"][0].tostring(); db.add(item); } } total = ds.virtuallistview.approximatetotal; } return db; } }
initially giving following error:
“the server not support requested critical extension.”
so did googling , did following steps:
1. applied kb977180-v2 http://support.microsoft.com/kb/977180 , restart windows 2. added key hklm\system\currentcontrolset\services\ntds\parameters
add string value “dsa heuristics” ,set value 000000000001,restart windows
so problem solved when ldap search result total count few thousands. (say 25 of 4000 objects fetched)
but when objects number exceed 4000, start getting same error again as:
“the server not support requested critical extension.”
so changed ldap default query parameters high values say
maxtemptablesize=300000 , restart windows
( reference: http://support.microsoft.com/kb/2009267 )
so things got better search working till 71,000 records (say 25 of 71,000)
but still when search records more 100,000 (say 25 of 100,000)
i still gets error as:
the server not support requested critical extension.
note here have seen url:
i don’t have problem of “the problem “modifytimestamp” getting changed “whenchanged” before search executed. ” because not searching on these fields.
so the problem occurs @ high volume data more 71,000 ( 25 of 100,000). till 71,000 that is( 25 of 71,000) , working fine.
any suggestions/directions solve high volume data (say 25 of 100,000)?
cyberbug
hi,
ldap limitations hardcoded , can tune editing ldap policy. performance concerns, maxium limits of maxtemptablesize 100,000. if can raise maxtemptablesize lower value , test query again.
while query processed, dblayer may try create temporary database table sort , select intermediate results from. maxtemptablesize limit controls how large temporary database table can be. if temporary database table contain more objects value maxtemptablesize , dblayer performs less efficient parsing of complete ds database , of objects in ds database.
please remember click “mark answer” on post helps you, , click “unmark answer” if marked post not answer question. can beneficial other community members reading thread.
Windows Server > Directory Services
Comments
Post a Comment