Hi
using System.Security.Permissions; namespace from .Net framwork in the code behind page as shown below to restrict access to few roles and handling the security exception in Global.asax file to redirect unAuthorized users to Unauthorized.aspx page.
It works fine on development machine(Visual studio Built-In server), when the application is moved to IIS i see below screen
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root dire ...
Go to the complete details ...