Click here to Skip to main content
15,171,851 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi sir,
Tell me the steps to set page level permission in C#. I developed one web application that have 10 aspx page.
If the user has administrator rights , they can able to view all the pages. If the user is a registered user, they can able to view
only 5 aspx file. If the user clicks the menu that is not authorized, i have to show error msg like "You are not authorized to view
this page content".
minu1989 1-Apr-13 2:24am
<-----------On pageload event use this code------------>

minu1989 1-Apr-13 2:34am
Use Membership Providers in your Application.

You can use ASP.NET authentication and authorization to provide security in ASP.NET pages.
use following link to understand ..

Beginner's Guide to Authentication and Authorization[^]

Forms Authentication and Role based Authorization: A Quicker, Simpler, and Correct Approach[^][^]
Best option is membership.

you will successfully resolve the issues regarding tablelocks or transaction dead locks.

1.Setup ASP.NET Membership provider database using Microsoft SQL server 2005
2.Create user
3.Create Role Add user in Role
4.Provider Role based security to your application
5.Redirecting authorized users to see his web section to which he is authorized to see
6.Password recovery control and configuration.
7.Single Sign in / single login / single signin

Follow below link for more details:

ASP.NET Membership

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900