Redirecting users to Custom "Not Authorized" page while implementing Role Based Authorization.


Server Intellect Web Hosting Solutions


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

Also See:

Profiles In ASP.NET 2.0
Basic ASP.NET WebParts Connections Tutorial
C# Generics, Serialization and testing with NUnit
Examining the Events Associated with Inserting, Updating, and Deleting
Passing Server-Side Values to Client-Side Script
AJAX, Remote Scripting.Net, Script Callbacks and other Goodness
Hotmail/Yahoo style multi-select ASP.NET datagrid
Creating User Customizable Homepages
Configuration section handler with .Net 2.0
Building ASP.NET 2.0 Web Sites Using Web Standards



Copyright© 2005 ASP Intellect | All Rights Reserved

ASP.NET Tutorials
AspNet Tutorials ASP.NET 2.0 Code Examples, Snippets and Tutorials

ASP.NET Tutorials C++ Tutorials C# Tutorials Visual Studio.NET Tutorials
.NET Framework Tutorials Mobility Tutorials Office Tutorials Visual Basic.NET Tutorials