0x80070035 The network path was not found RRS feed

  • Question

  • Hi!

    I have code in my Windows Service

    using (DirectoryEntry entry = new DirectoryEntry("LDAP://rootDSE"))


                  entry.AuthenticationType = AuthenticationTypes.ReadonlyServer | AuthenticationTypes.Secure;

                  string str = (string) entry.Properties["defaultNamingContext"][0];


    This code is throwing exception

    System.Runtime.InteropServices.COMException (0x80070035): The network path was not found. at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.PropertyValueCollection.PopulateList() at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName) at System.DirectoryServices.PropertyCollection.get_Item(String propertyName) at Iit.Shared.Config.ADServers.GetDomainNaming() at Iit.Shared.Config.ADServers.GetDistinguishedContainerName() at Iit.Shared.Config.ADServers.GetADPath(String systemName, SystemMode systemMode)

    I have no idea what is happening.

    I even not understand how Network path can be related to 
    LDAP://rootDSE and how it can't be found?

    I call sample code in ThreadPool thread and actually I have big suspicion that ThreadPricipal is wrong.

    May be user or login are wrong, may be identity is wrong or something.

    If anybody can explain how COMExcpetion 0x80070035 can be thrown by LDAP://rootDSE it will be very very usefull.

    Thank you for help!

    Monday, March 15, 2010 10:33 AM

All replies

  • any commend, may be it was wrong place to post?
    Wednesday, May 11, 2011 7:31 AM
  • I guess that there are no experts in that subject here.  What version of OSs are the client and server?

    Seen http://support.microsoft.com/kb/2194664 ?

    http://www.alanjmcf.me.uk/ Please follow-up in the newsgroup. If I help, mark the question answered
    Thursday, May 12, 2011 9:49 AM
  • It was Windows Server 2003, and Active Directoty .NET functions is still throwing sometimes unbelivable exceptions which not make sense. Looks code of AD .NET function and WinApi functions is just was made bad...
    Friday, May 13, 2011 1:35 PM