Click here to Skip to main content
15,921,028 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
VLV paginated group search not working in server.

What I have tried:

I use C# directoryServices to fetch it. when I implemented it I found that it was working find in windows 2022 server and the same was not working in windows 2019 server. It shows [The server does not support the requested critical extension.]. I searched google to enable VLV in server and I found its already enabled.

can someone help me with this. can this be fixed if we enable any settings.

Here is my code

using (DirectoryEntry entry = new DirectoryEntry(domainName, userPrincipalName, userPrincipalPassword))
{

    DirectorySearcher searcher = new DirectorySearcher(entry);
      
    searcher.VirtualListView = new DirectoryVirtualListView(st, end, off);

    searcher.Filter = criteria;
    searcher.Sort = new SortOption("name", SortDirection.Ascending);
    searcher.PropertiesToLoad.Add("name");
    searcher.PropertiesToLoad.Add("distinguishedname");
    searcher.PropertiesToLoad.Add("objectGUID");

    SearchResultCollection results = searcher.FindAll();

    if (results.Count>0)
    {
        foreach (SearchResult result in results)
        {
            Group group = new Group();
            group.name = result.Properties["name"][0].ToString();
            
        }
    }
}



Exception: Unhandled Exception: System.Runtime.InteropServices.COMException: The server does not support the requested critical extension.


I get this exception when I run it.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900