Re: restricting access based on Org Unit (OU)
- From: "Joe Kaplan" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 19 May 2008 21:05:48 -0500
If you want to use the role provider with Windows authentication, you can
use the WindowsTokenRoleProvider. It does the same thing as
IPrincipal.IsInRole in this instance.
Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"SpaceMarine" <spacemarine@xxxxxxxxxxxxxx> wrote in message
news:5f9dcc1e-f2df-4ee5-94ed-b5d39497ee78@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On May 19, 3:37 pm, "Joe Kaplan"
<joseph.e.kap...@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
There are many methods. If you are using Windows authentication in your
application, then you can just use the IsInRole method on the
WindowsPrincipal class. ASP.NET will insert a WindowsPrincipal
representing
the current Windows user into the HttpContext.User property and you can
access that from anywhere in a web app. You can also put this directly
into
the authorization section of the web.config and just add the role name to
the appropriate config parameter there (no coding needed).
Tho one question...How does this relate w/ using a Roles provider? I'm
not sure, but I think an ASP.NET could still use a custom Roles
provider, and use the the AD Group technique you've mentioned?
sm
.
- Follow-Ups:
- Re: restricting access based on Org Unit (OU)
- From: SpaceMarine
- Re: restricting access based on Org Unit (OU)
- References:
- restricting access based on Org Unit (OU)
- From: SpaceMarine
- Re: restricting access based on Org Unit (OU)
- From: SpaceMarine
- Re: restricting access based on Org Unit (OU)
- From: Joe Kaplan
- Re: restricting access based on Org Unit (OU)
- From: SpaceMarine
- Re: restricting access based on Org Unit (OU)
- From: Joe Kaplan
- Re: restricting access based on Org Unit (OU)
- From: SpaceMarine
- restricting access based on Org Unit (OU)
- Prev by Date: Re: restricting access based on Org Unit (OU)
- Next by Date: RE: Impersonate on specific directory
- Previous by thread: Re: restricting access based on Org Unit (OU)
- Next by thread: Re: restricting access based on Org Unit (OU)
- Index(es):
Relevant Pages
|