Re: ASP.NET with ADirectory role based authentication
From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 08/26/04
- Next message: Joe Kaplan \(MVP - ADSI\): "Re: DPAPI and config files"
- Previous message: Dan Amiga: "Re: DPAPI and config files"
- In reply to: naijacoder naijacoder: "RE: ASP.NET with ADirectory role based authentication"
- Next in thread: Paul Clement: "Re: ASP.NET with ADirectory role based authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 26 Aug 2004 09:44:34 -0500
This is easiest to do if you use Windows authentication in IIS against AD.
When you do that, ASP.NET will create a WindowsPrincipal object in the
Context.User property that is used for providing identity and authorization
services to your application. The IsInRole method in WindowsPrincipal will
return true or false based on the user's AD group membership. You supply
the group names in the form "domain\group name".
If you don't use Windows authentication and decide to use Form
Authentication against AD (which I don't recommend), then you need to
compute the user's group membership programmatically and create the
appropriate IPrincipal object.
Joe K.
"naijacoder naijacoder" <naijacoder@toughguy.net> wrote in message
news:uvWjVJ1iEHA.3232@TK2MSFTNGP10.phx.gbl...
> Thanks very much for the reply and for the article but
> i have made a form authentication already with ADirectory and its
> working FINE!
> But what i want to do now is to authenticate against a particular GROUP
> for example Security in Active Directory.
> For example a USER A logs in and he is not in the group called security
> he shouldn't have access and if he is in the GROUP Security then he
> should be authenticated.
> I was thinking about using ROLES in Active Directory but my Question is
> that can i have roles created in Windows 2000 server Active
> Directory?And if i can can i use form authentication directly to the
> ROLES in Actice Directory!!.
> Thnaks in advance and all ideas are welcome.
>
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
- Next message: Joe Kaplan \(MVP - ADSI\): "Re: DPAPI and config files"
- Previous message: Dan Amiga: "Re: DPAPI and config files"
- In reply to: naijacoder naijacoder: "RE: ASP.NET with ADirectory role based authentication"
- Next in thread: Paul Clement: "Re: ASP.NET with ADirectory role based authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|