473,385 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Role Based Authorization to pages in an Application

Hi,

I am developing an application and I am using the forms authentication for the authentication purpose.
Now I want to authorize users whether they are authorized to view the page or not for that i do not
want to configure the roles in the web.config file I would like to ge the values from the DB and verify
whether the user has rights to view the page. I need to check this to all the users for all the pages
available in the application.

For that how should I create a table structure? what are all the columns needed in that?
now I have two tables one UserDetails and RoleDetails. Please find the columns for those tables

UserDetails:
Userid (PK), UserName, Password, emailId, SecurityQuestion, SecurityAnswer, RoleId (FK)

RoleDetails
RoleId(PK), RoleName, description

could I make any changes to the existing table or create a table for rolerights? if so what are all
the columns need to be added?
Oct 28 '11 #1
1 1517
ck9663
2,878 Expert 2GB
Why not just add a code or a flag that will tell you what a role can and cannot open. Those code correspond to each of your page. On top of each page, check if the user has that code/page turned on for him before allowing to proceed. If not redirect him to an error page.


Happy Coding!!!

~~ CK
Oct 28 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: craig | last post by:
I am working on my first .NET development project that involves custom role-based security per the project requirements. This lead to a general design issue this week that really caused us some...
0
by: ChrisB | last post by:
Hello: I am a member of a team creating a .NET application, and we seem to have run into an issue when trying to implement role based security. Our application makes use of a fairly common...
4
by: hazz | last post by:
If I successfully run a VS.NET app which includes the following; ************************** APP 1 **************************** m_iIdnt = new...
2
by: Boris Condarco | last post by:
Hi gurus, I was reading some documentation about security in .NET Framework, it mention that it is possible to make custom Role Based security for example: check the authentication with Windows...
1
by: PTB | last post by:
I am using ASP.net with Access as my database. I would like to use role-based authorization for my login page. Can anyone help me? Thanks!
1
by: sean | last post by:
HI There, I have created 3 tables in my application tblUsers, tblRoles,tblGroups, when I perform a login and execute a store pocedure I return the user role for example "administrators". I would...
1
by: Mike Logan | last post by:
Questions about Role Based Security in ASP.Net: I have a few questions about role based security in an ASP.Net application. Below are some points about our system: - We have a hierarchical...
11
by: Jason | last post by:
I'm trying to implement role-based security in my ASP.NET application, however, everytime I perform an IsInRole check, it ALWAYS returns false! My Web.Config file has the following entry: ...
5
by: Archer | last post by:
I was making a role-based authentication but it does't login with correct password. the HttpContext.Current.User recieved in Global.asax is always null. Request.IsAuthenticated is always false....
5
by: Snig | last post by:
Hi all I need to implement the following scenario in my application: 1. Roles are stored in SQL-SERVER. 2. Access Rights will be given to the roles by the administrator by the application...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.