November 2008
Intermediate to advanced
935 pages
30h 36m
English
The central part of the Membership feature is its use of providers that derive from System.Web.Security.MembershipProvider. Out of the box, the Framework ships with two implementations of this class: SqlMembershipProvider and ActiveDirectoryMembershipProvider. Both of these providers are discussed in more detail in succeeding chapters. Because the Membership feature allows you to configure any type of provider, you can also write your own custom implementations of this class.
The base class definition that all providers must adhere to is shown below. The class definition falls into three major areas: abstract properties, abstract and protected methods, and a small number of event-related definitions.
C#
public abstract class MembershipProvider : ProviderBase
{
//Properties
public abstract bool EnablePasswordRetrieval { get; }
public abstract bool EnablePasswordReset { get; }
public abstract bool RequiresQuestionAndAnswer { get; }
public abstract string ApplicationName { get; set; }
public abstract int MaxInvalidPasswordAttempts { get; }
public abstract int PasswordAttemptWindow { get; }
public abstract bool RequiresUniqueEmail { get; }
public abstract MembershipPasswordFormat PasswordFormat { get; }
public abstract int MinRequiredPasswordLength { get; }
public abstract int MinRequiredNonAlphanumericCharacters { get; }
public abstract string PasswordStrengthRegularExpression { get; }
//Public Methods public abstract MembershipUser CreateUser( ...Read now
Unlock full access