相关疑难解决方法(0)

我可以从ASP.NET中的DirectorySearcher获取超过1000条记录吗?

我刚刚注意到结果的返回列表限制为1000.我的域(HUGE域)中有超过1000个组.如何获得超过1000条记录?我可以从以后的记录开始吗?我可以将其剪切成多次搜索吗?

这是我的查询:

DirectoryEntry dirEnt = new DirectoryEntry("LDAP://dhuba1kwtn004");
string[] loadProps = new string[] { "cn", "samaccountname", "name", "distinguishedname" };
DirectorySearcher srch = new DirectorySearcher(dirEnt, "(objectClass=Group)", loadProps);
var results = srch.FindAll();
Run Code Online (Sandbox Code Playgroud)

我试过设置srch.SizeLimit = 2000; ,但这似乎不起作用.有任何想法吗?

c# asp.net active-directory

68
推荐指数
1
解决办法
6万
查看次数

.NET:如何在Active Directory中查找用户?

如何在Active Directory中查找用户?

一些示例用户名是:

  • avatopia \伊恩
  • 化身\伊恩
  • ian@avatopia.com
  • ian@avatopia.local
  • avatopia.com \伊恩

重要的是要注意我不知道域的名称,我不应该硬编码.

堆栈溢出上有一些示例代码失败.

using System.DirectoryServices;

/// <summary>
/// Gets the email address, if defined, of a user from Active Directory.
/// </summary>
/// <param name="userid">The userid of the user in question.  Make
/// sure the domain has been stripped first!</param>
/// <returns>A string containing the user's email address, or null
/// if one was not defined or found.</returns>
public static string GetEmail(string userid)
{
    DirectorySearcher searcher; …
Run Code Online (Sandbox Code Playgroud)

.net active-directory

11
推荐指数
1
解决办法
1万
查看次数

如何从Active Directory检索用户的登录名?

我想从Active Directory检索用户的登录名.

例如,名称是'Jan Van der Linden'在将此名称作为参数后,我必须获取他的登录名作为回报,例如jvdlinden

c# asp.net active-directory

5
推荐指数
1
解决办法
9599
查看次数

标签 统计

active-directory ×3

asp.net ×2

c# ×2

.net ×1