C# Active Directory 查询 sAMAccountname 返回数字数组而不是字符串

发布于 2024-12-26 04:47:53 字数 479 浏览 2 评论 0原文

我的网站上发生了一件非常奇怪的事情,我无法弄清楚。

我有一个查询 LDAP 连接的自动完成框。连接工作正常,我从 LDAP 查询得到响应。但是,这就是问题开始的地方。

在我的本地计算机上,我得到响应:

[{"label":"TestUser, Bill","value":"Testuesr, Bill","AdLogon":"bill.testuser"}]

但在我的服务器上,我得到响应:

[{"label":"TestUser, Bill","value":"Testuesr, Bill","AdLogon":[67,111,108,109,95,67]}]

有谁知道什么可以启动这个?

更新 如果我将 AppPool 从 AppPoolIdentity 更改为 NetworkService 那么它会返回正确的值。

I have a really strange thing happening on my site and I cant figure it out.

I have an auto complete box that queries an LDAP connection. The connection works fine and I get responses from the LDAP Query. BUT, here is where the problems start.

On my local machine, I get the response:

[{"label":"TestUser, Bill","value":"Testuesr, Bill","AdLogon":"bill.testuser"}]

but on my server I get the response:

[{"label":"TestUser, Bill","value":"Testuesr, Bill","AdLogon":[67,111,108,109,95,67]}]

Does anyone have any ideas what could be starting this?

Update
If I change the AppPool from AppPoolIdentity to NetworkService then it returns the proper values.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无声无音无过去 2025-01-02 04:47:53

“67,111,108,109,95,67”是“Colm_C”的整数数组,这是因为特殊的字符 '_' 。如果认为底层需要将 sAMAccountName 转换为 B64 字符串,然后将其作为数组返回。

"67,111,108,109,95,67" is the integer array for "Colm_C", It's so becaise of the special catacter '_' . If think that an underlying layer need to transform sAMAccountName in a B64 string and it's then given back as an array.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文