【发布时间】:2011-07-06 23:33:03
【问题描述】:
如何从 Active Directory 中获取用户列表?有没有办法提取用户名,名字,姓氏?我看到一个类似的帖子使用了这个:
PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "YOURDOMAIN");
我从来没有对活动目录做过任何事情,所以我完全迷失了。任何帮助将不胜感激!
【问题讨论】:
-
阅读出色的 MSDN 文章 Managing Directory Security Principals in the .NET Framework 3.5,了解如何将 AD 与 .NET 3.5 结合使用
-
看起来@marc_s 的文章已归档,这是updated link
-
@marc_s 先生,我很想阅读,但链接已失效。我试过这个blogs.msdn.microsoft.com/msdnmagazine/2008/01/16/…,但即使是那篇文章上的链接也会指向微软杂志的基因页面
-
@Malky.Kid 我找到了这篇文章的方法。对这个问题使用link of the first comment 并下载January 2008 issue。阅读前不要忘记在资源管理器属性页面中取消阻止 chm 文件。
标签: c# asp.net .net active-directory