Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the User information stored in two different tables in ASP.NET's default Membership Provider?

There are two tables: aspnet_users and aspnet_membership. Can anyone elaborate on the reasons why they don't use a single table for this?

like image 256
kitsune Avatar asked Apr 27 '09 18:04

kitsune


People also ask

Which instance holds the user identity in ASP.NET page?

This instance is of type IPrincipal . IPrincipal is a special interface used to represent different identity types inside ASP.NET. It holds an IIdentity that represents the user identity plus its roles as an array of strings.

How can we implement membership provider in ASP NET MVC?

Let's create a application for membership provider ASP.NET MVC. Step 1: Go to visual studio and click on new project -> a window will open from here select a 'ASP.NET MVC4 web application' and give the name for this project in my case I give it as “MVCMembershipProvider ".


1 Answers

The membership table holds information related to the MembershipProvider API interface. The users table stores usernames and user ids, which are referenced from many providers.

  • Users
    • Membership (MembershipProvider)
    • Profile (ProfileProvider)
    • Roles (RoleManager)
    • etc

The aspnetdb system is very modular and each piece can be customized through the various providers. The tables need to be separated so each interface can be rewritten, redirected, etc.

like image 65
Alan Jackson Avatar answered Oct 16 '22 14:10

Alan Jackson