I already got a table stored all customer information. 开发者_开发问答Such as name, email phone, password and other things.
In this case, how can I take advantages of asp.net membership/role/profile provider?
I want to use annotation in MVC2 to do authentication and such.
Thanks for your advice, any reading URL is welcome.
You'll probably need to create custom membership provider.
Check out:
MSDN Article
ASP.Net Video
And see if they help you
There are very simple way 1. use aspnet_regsql.exe (in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727) Choose option add to existing database Use your name, email, phone like Profile, or you can create script which add users automatically(and you need add to this user phone,email etc) http://forums.asp.net/p/1540444/3753784.aspx (It's useful documentation about asp.net roles,membership etc) https://web.archive.org/web/20211020202857/http://www.4guysfromrolla.com/articles/120705-1.aspx
I'm throwing in a CW answer to compare/contrast the other two "real" answers.
So you have two choices: Use the standard membership provider and their database schema as per John's answer, or create your own membership provider and utilize your current database as per user517656's answer.
If you use the standard provider, you'll have to migrate your users into the microsoft database. But once you do that, you shouldn't have to write much code at all.
If you use a custom provider you have to write all of the code yourself, but you don't have to change your database.
精彩评论