views:

60

answers:

2

Is there an ADSI Library out there for .NET/C#? I have been able to find bits and pieces of code to do some tasks but nothing comprehensive.

I'm looking for a library that I can just drop into my code and run without having to do too much customization? I'm thinking something along the lines of MEMM for Excel

Thanks.

+2  A: 

You have all that you need in .NET in the System.DirectoryServices.ActiveDirectory assembly. There is a large set of samples on Codeproject.

Mart
+2  A: 

For .NET 1.x, there's really only the System.DirectoryServices namespace - not much more, unfortunately. That's your basic DirectoryEntry and DirectorySearcher classes, and that's about it.....

.NET 2.0 added the S.DS.ActiveDirectory namespace to handle structural objects like forests, domains, and so forth a lot easier. Check out this MSDN article New Ways to Manage Active Directory using the .NET Framework 2.0 on how to leverage those new capabilities.

For .NET 3.5 and up, there's a new S.DS.AccountManagement namespace which makes working with principals (users, groups, computers) a lot easier. Again, for an excellent intro, read this MSDN article Managing Directory Security Principals in the .NET Framework 3.5.

Hope that helps a bit!

Marc

marc_s
Guess I'm rolling my own :-) Thanks for the links and information.
nsr81