Skip to main content

Posts

Showing posts with the label System.DirectoryServices.AccountManagement

Programming AD with C#.NET – part 2

To work around the memory leaking issues in the .NET classes is in theory quite simple, do not use those classes. That is the starting point we had. Instead what we want to do is, by minimizing the affection on all our projects, rebuild our AD classes to use a beter way to communicate with the Active Directory. In .NET 2.0 the  System.DirectoryServices.Protocols  was introduced, which is a collection of general classes to communicate with practically any directory over LDAP. Unlike  System.DirectoryServices  which builds on  ADSI , the  System.DirectoryServices.Protocols  builds on the newer and better wldap32.dll. Heres an overview of the different namespaces and what teqniques they rely on, taken from  Introduction to System.DirectoryServices.Protocols . In .NET 3.5 yet another namespace arrived, namely  System.DirectoryServices.AccountManagement . This is excactly as it sounds a set of classes for account management. In theory thi...