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

0

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?

vb.net
directoryservices
directoryentry
asked on Stack Overflow May 9, 2011 by Dan Hamik • edited May 9, 2011 by CRM

1 Answer

0

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.

answered on Stack Overflow Nov 25, 2014 by vr_driver

User contributions licensed under CC BY-SA 3.0