To check for a user’s existence in Active Directory, which one is the better .Net library to use?
System.Web.Security.ActiveDirectoryMembershipProvider
or
System.DirectoryServices
I’m using using System.DirectoryServices and I feel it is the exact one to use. I do see there are similar features provided in here.
Please advise.
Since you’re on .NET 4.0, you should check out the
System.DirectoryServices.AccountManagement(S.DS.AM) namespace. Read all about it here: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!