ASP.NET Core 中使用 Novell.Directory.Ldap.NETStandard2_0 的受限用户(登录工作站)的 LDAP 身份验证问题

LDAP authentication problem in ASP.NET Core for restricted users (logon workstations) using Novell.Directory.Ldap.NETStandard2_0

我使用 Novell.Directory.Ldap.NETStandard2_0 程序包从 Active Directory 验证用户,它对大多数用户都工作正常。

using (var cn = new LdapConnection())
{
    cn.Connect(ldapOptions.Host, ldapOptions.Port);
    var userDn = username.IndexOf('@') < 0 ? username + $"@{ldapOptions.Domain}" : username;
    cn.Bind(userDn, password);
    if (cn.Bound)
    {
        result.Result = AuthResult.Succeed;
        result.Message = "Login Successful using LDAP: {0}.";
    }

    return result;
}

问题是当我们需要对仅限登录到我们域 (Active Directory) 中的某些计算机的用户进行身份验证时。

我已将托管我的应用程序 (IIS & Win Server 2016) 的计算机添加到列表中,但它仍然失败并且受限用户无法通过身份验证。

我该如何解决这个问题?我应该更改我的代码吗?或激活 Directory/IIS 设置?

LDAP 身份验证通常来自域控制器,因此配置为 LDAP 主机的域控制器需要出现在登录工作站 (userWorkstations) 列表中。