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 provid开发者_JAVA技巧er 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.
精彩评论