在 2008 R2 上以非管理员帐户使用 System.Directoryservices 时出错

发布于 2024-11-06 04:12:10 字数 452 浏览 6 评论 0原文

我有一个使用 system.directoryservicesdirectorysearcher 的程序。

在 2003 R2 上,它可以作为任何用户帐户使用,并且仅列出他们有权查看的内容。 然而,在 2008 R2 上,它只能作为本地服务器的管理员用户运行,而不是作为普通用户帐户运行。

我收到的错误是

0x80070035“未找到指定的网络路径”

尝试创建 searchresultcollection 时,

。似乎失败的第一部分位于

system.directoryservices.directoryentry.bind(boolean throwIfFail) ,但当我使用管理凭据以自己的身份登录时它可以工作。

有什么想法吗?

I have a program that is using system.directoryservices and the directorysearcher.

On 2003 R2 this works as any user account, and only lists what they have rights to see.
On 2008 R2, however, it only works as a user that is an administrator of the local server, not as normal user accounts.

The error I am getting is

0x80070035 "The specified network path was not found"

when trying to create a searchresultcollection.

The first part that appears to be failing is at

system.directoryservices.directoryentry.bind(boolean throwIfFail) but it works when I am logged in as myself with administrative credentials.

Any thoughts?

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

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

发布评论

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

评论(1

空气里的味道 2024-11-13 04:12:10

虽然我知道这个问题不久前已列出,但我也遇到了类似的问题,使用 Windows 8.1 的登录脚本也出现相同的 0x80070035 错误

Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)

事实证明,我使用的 DNS 与办公室其他部分不同使用。我的 Google 版本是 8.8.8.8。当我把它取下来时,登录脚本再次工作,我能够取回所有映射驱动器。

我只是想分享我的修复方法。

While I know this problem was listed a while ago, I was having a similar problem too, with the same 0x80070035 error for my logon script using Windows 8.1

Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)

As it turns out, I was using a different DNS to what the rest of the office was using. I had the Google one of 8.8.8.8. When I took it off, the logon script worked again and I was able to get back all of my mapped drives.

I just thought I'd share my fix.

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