I am writing a C#/asp.net app.I have a requirement to check if the user is
member of specific Domain group,how can this be accomplished?
I tried the following and it always returns false ,even if the user is part
of the group.
WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent());
if(wp.IsInRole(@"Domain\group"))
{
MessageBox.Show("member",wp.Identity.Name);
}
else
{
MessageBox.Show("not menber",wp.Identity.Name);
}
TIA,
Vinny