Varun
Varun

Reputation: 526

How to do authentication using active directory group in asp.net?

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

Answers (1)

PraveenVenu
PraveenVenu

Reputation: 8337

Please use the help here

http://msdn.microsoft.com/en-us/library/ms180890.aspx

(updated link)

Upvotes: 2

Related Questions