Reputation: 3091
How i can realise my own Membership Provider for my social network example project where i want to use more extended registration with new fields? Thanks.
Upvotes: 8
Views: 1134
Reputation: 13230
You can add a ProfileProvider which works with and extends the MembershipProvider. Have a look at this blog from Scott Guthrie: http://weblogs.asp.net/scottgu/archive/2006/01/10/435038.aspx
Upvotes: 1
Reputation: 36071
You could use the default Memership Provider details and create another table to store the extended registration details that you need to store.
You can then have a foreign key in this new table storing a link to the Membership Provider User table. You can then link back to this and update,view,insert and of the extra information as and when you need to?
Upvotes: 3
Reputation: 43207
Membership Providers are not meant for holding user profile details, their purpose is to give your application a mechanism for authentication and user-management - that's it. Like, Fermin correctly said, create a seperate table with one-to-one relation with your primary membership provider table on its UserId. Given this fact, you actually don't need a custom membership provider
unless your member provider has to work against a different table with different schema for holding membership details.
Upvotes: 5