By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,262 Members | 2,664 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,262 IT Pros & Developers. It's quick & easy.

Want to create a custom membership provider, but use SQLMembershipProvider functionality

P: n/a
Hi all,

I'm about to start creating a custom membership provider. Its for a
website that already has a table of users in a single table, so I need
to create a custom MP to talk to the data in that table.

In addition, my custom membership provider needs to be able to do this:

1) Hash the password.
2) Verify the strength of the pasword when a user is created. I want to
use the same kind of rules that exist for the SQLMembershipProvider,
e.g. a regular expression that can be set in the web.config to specify
the format of the password (PasswordStrengthRegularExpression) . I also
want to specify a min/max password length
3) Specify a password expiration length.

These features all exist in the SQLMembershipProvider, and I want to be
able to use the same kind of functionality (driven by the web.config
provider settings) for my custom provider. Do I need to write all of
the code in my custom provider to implement things like checking the
password strength and length when a new user is created, or does
functionality exist in the abstract class that I can make use of?

As an example, I see that the MembershipProvider class has a method
"PasswordStrengthRegularExpression" which I can use to set the regular
expression for password strength. But how do I make use of this? Since
its part of the MembershipProvider class then can I also use a method
on the MembershipProvider class that will do the strength check for me,
or do I need to write code myself to check this?

Thanks for any responses.


Oct 19 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.