开发者

Error when using System.Directoryservices on 2008 R2 under a non-administrator account

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

On 2003 R2 this works as any user account, and o开发者_如何转开发nly 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜