Network path not found when attempting to connect to RootDSE

0

I am running into a bit of a frustrating problem. I am running into a permissions issue I believe on this line of code in VB.NET Framework 4.6

Dim objRootDSE As New System.DirectoryServices.DirectoryEntry("LDAP://RootDSE")

When running from a account that has domain administrator privledges everything works as expected but when running from a normal test user account which is a member of Domain Users only I receive the following error:

System.Runtime.InteropServices.COMException (0x80070035): The network path was not found.

When I add the test account to the domain administrators group it starts behaving as it should.

I have tried the following things:

  1. Tried connecting directly to the user object via the LDAP string (It should have rights to read its own object) but this also did not work.
  2. Not connecting to the RootDSE and connecting directly to the Server and OU. This also did not work same error
  3. Loaded an LDAP Browser onto the same computer running in the test user context (not as a domain administrator) and I am able to browse my Active Directory just fine.
  4. Run C:\Windows\System32\rundll32.exe dsquery,OpenQueryWindow ...am able to search for the test user (via the test user context) and even update personal fields in the AD object.

Anybody have any ideas? I am stumped.

Thanks

.net
active-directory
ldap
asked on Stack Overflow Mar 14, 2016 by Willy

1 Answer

0

Figured this out and it's rather strange. When running the executable via a UNC or network share it gets this error. When the executable is copied locally and run from the desktop it behaves as it should. I suspect some sort of permissions / trust issue even though the test user account does have local administrative rights.

answered on Stack Overflow Mar 16, 2016 by Willy

User contributions licensed under CC BY-SA 3.0