How to Search User in Active Directory using LDAP in Asp.net C#
问题 How can I fetch all the record from my Active Directory Server in asp.net c#? 回答1: Make a connection string in LDAP providing username and Password which can communicate with the server and have Administrator rights. Suppose DC is me.com and username and password are the password of that user Id which is having Administrator rights . DirectoryEntry rootDSE = rootDSE = new DirectoryEntry("LDAP://OU="",OU=" ",dc="me",dc=com", username, password); DirectorySearcher search = new DirectorySearcher