Customized Membership Provider

G

Guest

Hi all,
We currently have our own customer/login tables in our database linked with
CustomerID columns of both tables. Some of the requirements of the system are

1) When I validate users, I need to pass more parameters than just
username/password, for example customers are created for different clients,
so I need to pass our ClientID with username/password together. We build one
portal to support multiple clients.

2) When a customer is validated, I need to get CustomerID instead of
username from Context.User.Identity.

By implementing MembershipProvider class, I don't think I can achieve any of
requirement mentioned above. Do I miss something or there are some other
tricks I don't know?

Thanks for any suggestions or comments!
 
G

Guest

You can certainly implement what you describe, you will need to write a
custom MembershipProvider that derives from the ProviderBase class.
There is plenty of sample code around for implementing custom Membership,
Profile, and Roles providers.
Peter
 
G

Guest

Sorry, I implemented MembershipProvider class, ValidateUser only accepts 2
parameters, but I need more.

public override bool ValidateUser(string username, string password) {
}

How can I do it?

Let me do a search around.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top