Basically I am creating an employee change request form and want to load up email groups in a selection listed (for add/removing memberships) I am working in Visual C# and trying to create a separate class that uses directory services to accomplish this. When I add the class to the App_Code folder it is no longer able to find the System.DirectoryServices and gives me an error. What am I missing?
Share
If you’re on .NET 3.5 and up, you should check out the
System.DirectoryServices.AccountManagement(S.DS.AM) namespace. You’ll need to add this to your project as a .NET reference.Read all about it here:
Managing Directory Security Principals in the .NET Framework 3.5
Basically, you can define a domain context and easily find users and/or groups in AD:
The new S.DS.AM makes it really easy to play around with users and groups in AD: