If you are using .NET 3.5 and above, you should check the namespace System.DirectoryServices.AccountManagement(S.DS.AM). Read more here:
Managing Directory Security Principles in the .NET Framework 3.5
Basically, you can define the context of a domain and easily find users and / or groups in AD:
PrincipalContext ctx = new PrincipalContext(ContextType.Domain);
if (ctx.ValidateCredentials(userName, password))
{
}
GroupPrincipal group = GroupPrincipal.FindByIdentity("YourGroup");
UserPrincipal user = UserPrincipal.Current;
if (user.IsMemberOf(group))
{
}
The new S.DS.AM makes it very easy to play with users and groups in AD:
If you primarily use ASP.NET applications, I would recommend checking out the ASP.NET membership providers and roles that have an interface to AD so that you can use AD groups (and user membership in these groups) as criteria for enabling / disabling certain functions.
See some related blog posts: