How to list domains running code from a non-domain computer?
问题 In my application I need to get Active Directory forest and list the domains hierarchy. I was given the Active Directory account that has necessary permissions. However my development computer is NOT on the domain and can not be added to the domain. Here is the code that I am using to get the forest and access the root domain: // I also tried to add a Global Catalog port: 192.168.2.11:3268, no success DirectoryContext dc = new DirectoryContext( DirectoryContextType.Forest, "192.168.2.11",