简体   繁体   中英

How to Use ASP.NET Membership Provider class

i want to use asp.net membership provider for my own database i have own table

here is what have i done i extended the membership provider class with my own write all overided methords. is it right way to use membership provider class for custom use?? i also extend the rolemanagement class too.

What's "right" and what's "wrong" is hazy, as different people have different opinions.

My opinion is that you should never extend the membership tables, because by doing so you create potential problems down the road if Microsoft decides to add additional functionality to those classes.

Instead, you should simply use the asp.net membership provider keys as foreign keys into your own tables. Thus, you might have your own "users" table, but one of the columns is the asp.net membership User ID value. This allows you to relate them together and get at that information, without extending the asp.net membership tables themselves.

I have tried implementing custom membership user, and succeeded after a month's effort. One idea I always have is, no one can ever generalize what our requirements should be, and especially a vendor should not decide in particular.

It is good we have a way to extend the membership user. This and that are the best resources to guide how to write a membership user.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM