2

I have this question: "Does implementing a custom MembershipProvider class needs you to implement a custom Membership class too?" I am a bit confused about implementing a custom membership framework on ASP.NET.

I dont have sample classes to show you but what if the previous website used a database or schema that is different to the ones ASP.NET uses?

Many thanks!

4

1 回答 1

5

In the MembershipProvider class you override the methods that you want to implement in a custom fashion, for example authenticating the user against the custom database or letting someone change their password. This will allow you to use the .NET login controls.

Usually this means you have your own user class of some sort already or will need to write one. You don't have to inherit MembershipUser to do so.

于 2009-01-10T04:51:33.150 回答