开发者

Custom Membership Provider for asp.net using c#

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.


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.


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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜