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

SqlMembershipProvider Model

P: n/a
Ron
Hi,

I want to create a new SqlMembershipProvider called SqlMembershipProviderEx

I will use it to create two User objects which only need a UserName and
Password.
ServiceProviders and Customers all other in formation is stored as profiles
for each object.

There is a constructor under the Membership.CreateUser() which take two
string values: UserName, Password

How can i create something similar to this but using the
Membership.CreateUser() method
that is a Provider model so i can just plug it into my web.config file.

class SqlMembershipProviderEx : SqlMembershipProvider
{

public override MembershipUser CreateUser(string username, string password)
{
if (username.ToLower() == password.ToLower())
{
status = MembershipCreateStatus.InvalidPassword;
return null;
}
else
{
return base.CreateUser(username, password);
}
}

}

Thanks

Ron
May 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.