Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Quick LDAP Tree

$
0
0

Still new to .NET and looking for advice...

I'm looking to create a tree based on information from Active Directory (via LDAP). I can get everything to populate using a recursive method, but it takes forever to run (it's a fairly large infrastructure to walk). If I just run an LDAP query scoped to get the all the info at once and lob it into a List, it runs pretty quick. But I'm left with a flat tree.

How can I get a list of info from LDAP (as quick as possible), but have it sorted for use in a tree? Should I look at stashing the info in a List, and then build my tree from that List? If so, what's the quickest/easiest way to parse the List?

        public string Name { get; set; }
        public string Description { get; set; }
        public string DistinguishedName { get; set; }
        public List<Tree> Children { get; set; }

        public Tree()
        {
            Children = new List<Tree>();
        }


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>