Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 26, 2008 02:04 PM by Heems
Member
1 Points
14 Posts
Nov 25, 2008 08:54 PM|LINK
Running asp.net 3.5. My web.config file protects one of my folders and limits it to 2 roles:
<location path="humanres"> <system.web> <authorization> <allow roles="Admin, HR"/> <deny users="*"/> </authorization> </system.web> </location>
However, there are 2 files in the "humanres" folder I'd like to make accesible to any authenticated (i.e. not anonymous) users. How can i accomplish this? I have tried to add a location tag but it's not doing the trick:
<location path="humanres/file1.aspx"> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> </location>
Thanks.
Participant
1167 Points
221 Posts
Nov 25, 2008 09:50 PM|LINK
try this:
<location path="humanres/file1.aspx"> <system.web> <authorization> <allow roles="users"/> <deny users="?"/> </authorization> </system.web> </location>
Nov 25, 2008 10:07 PM|LINK
I tried that, but no go... I think the deny="*" is preventing anything in that dir except the allowed roles...
All-Star
22198 Points
3463 Posts
Nov 25, 2008 10:19 PM|LINK
<location path="humanres/file1.aspx"> <system.web> <authorization> <deny users="?"/>
<allow users="*"/> </authorization> </system.web> </location>
<
Nov 26, 2008 02:04 PM|LINK
Heems
Member
1 Points
14 Posts
web.config protection for a dir except for 2 files - how?
Nov 25, 2008 08:54 PM|LINK
Running asp.net 3.5. My web.config file protects one of my folders and limits it to 2 roles:
<location path="humanres"> <system.web> <authorization> <allow roles="Admin, HR"/> <deny users="*"/> </authorization> </system.web> </location>However, there are 2 files in the "humanres" folder I'd like to make accesible to any authenticated (i.e. not anonymous) users. How can i accomplish this? I have tried to add a location tag but it's not doing the trick:
Thanks.
exuviae
Participant
1167 Points
221 Posts
Re: web.config protection for a dir except for 2 files - how?
Nov 25, 2008 09:50 PM|LINK
try this:
<location path="humanres/file1.aspx"> <system.web> <authorization> <allow roles="users"/> <deny users="?"/> </authorization> </system.web> </location>If you need further assistance, please let me knowChris Dupuy
http://techblog.chrisdupuy.com
Heems
Member
1 Points
14 Posts
Re: web.config protection for a dir except for 2 files - how?
Nov 25, 2008 10:07 PM|LINK
I tried that, but no go... I think the deny="*" is preventing anything in that dir except the allowed roles...
guru_sarkar
All-Star
22198 Points
3463 Posts
Re: web.config protection for a dir except for 2 files - how?
Nov 25, 2008 10:19 PM|LINK
try this:
<location path="humanres/file1.aspx"> <system.web> <authorization> <deny users="?"/>Heems
Member
1 Points
14 Posts
Re: web.config protection for a dir except for 2 files - how?
Nov 26, 2008 02:04 PM|LINK