在 2008 R2 上以非管理员帐户使用 System.Directoryservices 时出错
我有一个使用 system.directoryservices
和 directorysearcher
的程序。
在 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
虽然我知道这个问题不久前已列出,但我也遇到了类似的问题,使用 Windows 8.1 的登录脚本也出现相同的 0x80070035 错误
事实证明,我使用的 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
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.