Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 19th, 2007, 08:03 AM
Friend of Wrox
 
Join Date: Apr 2006
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with accessibility and role

Hi,

i defined a role ('manager') with one memberuser: Bob.
The website has a subdirectory called "allusers" which contains two pages:
allusers.aspx and manager.aspx.
The page allusers.aspx must be accessible by all users while the page
manager.aspx must be only accessible by members of the role manager.

The web.config of directory 'allusers' contains this:

 <location path="manager.aspx">
    <system.web>
      <authorization>
        <deny users="*" />
        <allow roles="manager" />
       </authorization>
    </system.web>
  </location>

When logged via login.aspx, the user is redirected to a menu.apsx with a
hyperlink to manager.aspx.
When logged as Bob and clicking on the link to manager.aspx, i have no
access and i'm redirected to login.aspx.
Why?

I added in web.config this:

<allow users="Bob" />

but still no access !!!

What's wrong here?
Thanks
Hertendreef

 
Old June 19th, 2007, 09:46 AM
Friend of Wrox
 
Join Date: Apr 2006
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found it.
<deny=..> must come after <allow ...>






Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessibility Checker Xaviar BOOK: Accessible XHTML and CSS Web Sites: Problem Design Solution 1 April 23rd, 2009 12:46 PM
problem with sitemap and role hertendreef ASP.NET 2.0 Basics 6 June 21st, 2007 05:22 PM
accessibility coding error in downloaded file hillcountry BOOK: Accessible XHTML and CSS Web Sites: Problem Design Solution 0 November 21st, 2006 05:37 PM
problem with role based authorization hotshot_21 ASP.NET 1.0 and 1.1 Basics 0 February 21st, 2006 08:12 AM
Problem with Edit Role Clarke76 BOOK: ASP.NET Website Programming Problem-Design-Solution 3 January 17th, 2005 01:15 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.