FormsAuthentication Roles Problem
From: James McFarland (com.sunporch.at.james_at_nospam.nospam)
Date: 11/24/04
- Next message: [MSFT]: "RE: FormsAuthentication Roles Problem"
- Previous message: Hernan de Lahitte: "Re: Roles not working"
- Next in thread: [MSFT]: "RE: FormsAuthentication Roles Problem"
- Reply: [MSFT]: "RE: FormsAuthentication Roles Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 24 Nov 2004 08:35:06 -0800
I want to use FormsAuthentication and allow access based on role.
I have a /Admin directory on the web app, and want to allow role "admin",
but deny all other users.
/Web.config:
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
/Admin/Web.config:
<authorization>
<allow roles="admin"/>
<deny users="*"/>
</authorization>
This setup prevents all users from accessing pages in the /Admin folder,
even users whose IPrincipal.IsInRole("admin") implementation returns true.
If I change /Amdin/Web.config to the below, it allows the "admin@mysite.com"
user in:
<authorization>
<allow users="admin@mysite.com" roles="admin"/>
<deny users="*"/>
</authorization>
Anyone ever seen this problem or have any idea what I am doing wrong?
All examples I have seen appear to use the <allow roles="admin"/> approach.
Thanks,
-james
-- James McFarland :: SunPorch Structures Inc.
- Next message: [MSFT]: "RE: FormsAuthentication Roles Problem"
- Previous message: Hernan de Lahitte: "Re: Roles not working"
- Next in thread: [MSFT]: "RE: FormsAuthentication Roles Problem"
- Reply: [MSFT]: "RE: FormsAuthentication Roles Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|