asp.net-mvc-4simplemembershipcustom-membershipprovider

Specifying password field to SimpleMembershipProvider


I'm implementing SimpleMembershipProvider in a small MVC4 project, and I can already initialize the database connection using a customer-provided DB with the user and role tables already specified (those are called sp_person and sp_role).

The problem is, when I try to log in, the MVC app rejects my password with the typical "incorrect password" error message though I already know that it's the correct password. I suspect the problem is that SimpleMembershipProvider does not know where do I store the password (it's in the sp_person table, in the "ecampus_password" field) and that's why authentication fails.

How can I tell SimpleMembershipProvider where to look for the stored password?

Thanks in advance,

Léster


Solution

  • Nevermind, I found that SimpleMembershipProvider is not the solution. In this case, I'm supposed to implement a custom provider.

    Steps as follows: