Redirecting users to Custom "Not Authorized" page while implementing Role Based Authorization.
Author:
Harish Ranganathan
When using Forms Authentication with Role Based Authorization, we can restrict users based on their role for different directories/pages.
However, if an user who doesn't have authorization to view a page, tries to view the same, he will be directed to the Login page with a ReturnUrl parameter, despite the user already being logged in.
That doesnt give any idea to the user as to why he is getting directed to the same login page while he has already logged in and doesnt give him the message that he is not an authorized person to view that page.
This article discusses how to redirect them to a custom "Not Authorized" page.
More Tutorials
|