Alex Rivera | Logout

What is aspnet_Users and aspnet_Membership? Which one should I use? What is the difference?

Asked 2011-12-09T16:12:54.547
9

I'm using default membership class in my website. But I'm a little confused with the complex database design of the ASPNETDB.

Let's say I want to add details about user like name, surname, address etc... Where should I put them aspnet_Membership table or aspnet_Users table and why? I mean I can see that I should put the details on aspnet_Membership. But then again why there is two of them and the bindings on aspnet_Users...

Or lets say I'm adding a messaging into that which table should I key to, for the user details?

I'm confused and I would be appreciated if you can tell me the use of these two tables.

Here is the diagram for the default ASPNETDB which you should probably have:

enter image description here

Edit
Report

1 Answer

4

If you want to connect your custom table to ASP.NET membership, use UserId as foreign key from aspnet_Users table rather than aspnet_Membership table to your custom table. For reference, please note how aspnet_Profile or even aspnet_Membership is using UserId as foreign key from aspnet_Users table.

Please see the database diagram here: http://msdn.microsoft.com/en-us/library/Aa478948.asp2prvdr0102l(l=en-us).gif

Good luck ...

answered 2012-12-23T13:08:06.083

Your Answer