1

in my Project i need to define 3 roles :

  1. SuperAdmin
  2. Admin
  3. RegisteredMembers

I also have Table which named "Users" that stores information such as:

  1. fristName
  2. lastName
  3. Birthday
  4. Username
  5. Password . . . and etc

How can i make Roles recognize which user is for which Role when users try to log on to website?

1 Answer 1

0

First of all you creating a Users table is just the first step. You also need a Role table and a UserRole many-to-many relationship table to store which user belongs to which role(In a simple scenario).

That's for the database part of the whole concept.

Then, on the code side...since you're providing different tables than the ones in the AspNetMembership you need to also implement a custom membership provider, custom role provider and presumably a custom membership user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.