View Single Post
  #1 (permalink)  
Old March 11th, 2006, 07:40 PM
saif44 saif44 is offline
Authorized User
 
Join Date: Feb 2006
Location: , , .
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default accessing pages with roles authorization

Hi,

i have set three roles in my application, one role for adminstration, another for managers and the final one for normal users. some pages are allowed for some roles but not for others. for instance there are a number of pages that can be accessed by the managers but not the normal users. the problem here is when the normal user attempt to enter the manager pages the system redirect the user to an error page which says:

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /ECBS/login.aspx


i don't know what is the problem? here is my config file which shows the following: (see that if it can help)

<authentication mode="Forms"/>

<authorization>

<allow roles="admin, users, client"/>

<!--when you create a role from the administration tools in the website,

the above code is added to the web config.-->

</authorization>

the first page that load in my application is the login page. this then will allow all these roles the access to the home page (based on their authentication) where all other pages are located.

so when the person click on a page that is not authorized to see it, i would like to redirect the person to a page where it says "access denied you don't have enough previlige".

how can i do this. thank you very much