PC Review


Reply
Thread Tools Rate Thread

Check if user is a member of a domain group

 
 
=?Utf-8?B?VmlubnkgVmlubg==?=
Guest
Posts: n/a
 
      27th Sep 2005
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveDirectory - check if user is member of a group Iain Microsoft ASP .NET 5 19th Oct 2009 04:28 PM
Check if user is a member of a domain group =?Utf-8?B?VmlubnkgVmlubg==?= Microsoft ASP .NET 1 27th Sep 2005 10:18 PM
Check an user is member of a Domain Venkat Windows XP General 0 5th May 2005 04:34 PM
Check group member ship or a user Sameh Ahmed Microsoft VB .NET 9 21st Feb 2005 10:46 AM
Domain Local Group member listing by user ID bobk Microsoft Windows 2000 Active Directory 1 27th Aug 2003 02:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:32 AM.