Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 02, 2013 06:30 PM by Fatmanspicnic
Member
29 Points
79 Posts
Dec 29, 2012 10:49 AM|LINK
Hi Folks,
I am trying to set up trimming in my application.
I use the following code to only allow admin to access the page, but it does not work, can anyone give me a clue?
<authentication mode="Forms"> <forms loginUrl="Default.aspx" timeout="2880" /> </authentication> <location path="~/Vota/Fin/Doc Despesa/EditDocDesp.aspx"> <system.web> <authorization> <allow roles="admin"/> <deny users="*"/> </authorization> </system.web> </location>
All-Star
31671 Points
6473 Posts
Dec 29, 2012 04:19 PM|LINK
Dec 29, 2012 04:35 PM|LINK
Unfortunately no.
But thanks for you help
2 Points
1 Post
Jan 02, 2013 06:30 PM|LINK
Hi Moises,
Just a thought but have you tried supplying a path with no preceeding tilde and forward-slash?
So in your case:
<location path="Vota/Fin/Doc Despesa/EditDocDesp.aspx"> <system.web> <authorization> <allow roles="admin"/> <deny users="*"/> </authorization> </system.web> </location>
I'm pretty sure that will work... Thanks, Neil.
Moises Durov...
Member
29 Points
79 Posts
deny user access to page
Dec 29, 2012 10:49 AM|LINK
Hi Folks,
I am trying to set up trimming in my application.
I use the following code to only allow admin to access the page, but it does not work, can anyone give me a clue?
<authentication mode="Forms"> <forms loginUrl="Default.aspx" timeout="2880" /> </authentication> <location path="~/Vota/Fin/Doc Despesa/EditDocDesp.aspx"> <system.web> <authorization> <allow roles="admin"/> <deny users="*"/> </authorization> </system.web> </location>Moisés
oned_gk
All-Star
31671 Points
6473 Posts
Re: deny user access to page
Dec 29, 2012 04:19 PM|LINK
Moises Durov...
Member
29 Points
79 Posts
Re: deny user access to page
Dec 29, 2012 04:35 PM|LINK
Unfortunately no.
But thanks for you help
Moisés
Fatmanspicni...
Member
2 Points
1 Post
Re: deny user access to page
Jan 02, 2013 06:30 PM|LINK
Hi Moises,
Just a thought but have you tried supplying a path with no preceeding tilde and forward-slash?
So in your case:
<location path="Vota/Fin/Doc Despesa/EditDocDesp.aspx">
<system.web>
<authorization>
<allow roles="admin"/>
<deny users="*"/>
</authorization>
</system.web>
</location>
I'm pretty sure that will work...
Thanks,
Neil.