How to get Active Directory connection string in C#.NET
First you will have to add a reference for System.DirectoryServicesYou must run the application on a machine within the same domain to be able to connect to the Active Directory using System.DirectoryServices; private string GetActiveDirectoryConnectionString() { DirectoryEntry root = new DirectoryEntry("LDAP://RootDSE"); using (root) { string dnc = root.Properties["defaultNamingContext"][0].ToString(); string...