p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.x and 2.0 Application Design (http://p2p.wrox.com/forumdisplay.php?f=67)
-   -   Roles and membership asp.net 2 (http://p2p.wrox.com/showthread.php?t=47811)

zeeshannasir September 14th, 2006 04:49 AM

Roles and membership asp.net 2

i have my whole database and also have tables for user login etc. Now i want to use my tables not the tables generated by aspnet_regsql for roles and membership. its client requirement that i must use tables he has provided me. he has two different tables, one for end users and one for admins. and he dont want it to be changed. Is there any way i can use these tables and implement .net 2 feature of memberships and roles.

please help.

thanks in advance

peace95 September 22nd, 2006 03:34 AM

zeeshannasir: It is not clear as to what level the two tables will be applied, however I am responding from the Point Of View (POV) of the application level. In your database, create a RoleTbl, defines all the possible Roles:
RoleID RoleDescription
1 Role A
2 Role B
3 Role C
Another helpful table, if it does not exist already is an Application Table:
AppID ApplicationDesc
1 App 1
2 App 2
Now you can create the relationships, 1) Identify the Admin in each Application:
AdminAppID AdminID AppID
1 1 1
2 1 2
3 2 3
Next you would create a EndUserRoleTable By Application. This will be one of your largest table because it allows for your end users to have access to different and multiple applications and roles maybe.
1 EU1 1 1
2 EU1 1 2
3 EU2 2 1
One constraint that should be considered here is if the Admin is also an End User. I would think that "Admin" is a type of Role. Just a thought.

Hope this helps.

All times are GMT -4. The time now is 06:21 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.