Reputation: 526
I need to do validation of users using "active directory" group. For that I am using this
private void LoadSourceAccessContextInfo()
{
if (Context.User.IsInRole("ActiveDirectory"))
{
//Do something
}
else
{
Response.Redirect("./NoAccess.html", true);
}
}
But all the time it is not comes to else condition, but user is valid. Please let me knw anything else I need to do? Or please send me the code whcih can found all user in an AD group.
Thanks in Advance
Upvotes: 1
Views: 6539
Reputation: 8337
Please use the help here
http://msdn.microsoft.com/en-us/library/ms180890.aspx
(updated link)
Upvotes: 2