Are you using .NET 3.5 ??
If so, check out this great MSDN article, "Managing Directory Security Principles," in the .NET Framework 3.5 , which shows a new feature for users and groups in .NET 3.5.
In this case, you need the main context (for example, your domain):
PrincipalContext domainContext =
new PrincipalContext(ContextType.Domain, "YourDomain");
and then you can easily find the user:
UserPrincipal user = UserPrincipal.FindByIdentity(principalContext, "username");
"UserPrincipal" "GetAuthorizationGroups", , :
PrincipalSearchResult<Principal> results = user.GetAuthorizationGroups();
foreach (Principal result in results)
{
Console.WriteLine("name: {0}", result.Name);
}
, ?
.NET 3.5 LDAP (PHP, Delphi ..).