ADSI Library/Control for .NET

别来无恙 提交于 2019-12-13 21:25:41

问题


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.


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/1640022/adsi-library-control-for-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!