Hello news.microsoft.com,
the source looks like this (in the Membership class)
public static bool RequiresQuestionAndAnswer
{
get
{
Membership.Initialize();
return Membership.Provider.RequiresQuestionAndAnswer;
}
}
Initialize loads the configured default provider and assigns the instance
to the Provider property. So - they read the value from the currently loaded
provider implementation - which is your custom provider. You are responsible
in your provider to implement a Initialize method and read the values from
the NameValueCollection (to populate the properties).
so - your scenario should work.
you have to closely follow all the design pattern by microsoft - read more
here:
http://msdn.microsoft.com/asp.net/be...s/default.aspx
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
> How can get the values of for example RequiresUniqueEmail from my own
> membershipprovider? Using is
> System.Web.Security.Membership.RequiresQuestionAnd Answer; is not an
> option because it will call the property from the membership provider.
>
> <membership userIsOnlineTimeWindow="15"
> defaultProvider="MembershipProviderSample">
> <providers>
> <add name="MembershipProviderSample"
> type="SecurityProviders.MembershipProviderSample"
> EnablePasswordReset="true"
> EnablePasswordRetrieval="true" MaxInvalidPasswordAttempts="5"
> MinRequiredNonAlphanumericCharacters="0"
> MinRequiredPasswordLength="6"
> MembershipPasswordFormat="Clear"
> RequiresQuestionAndAnswer="true"
> RequiresUniqueEmail="true"
> PasswordStrengthRegularExpression="[0-9a-zA-Z]{6,12}$"/>
> </providers>
> </membership>