I derived a class from MembershipProvider
in System.Web.Security
with the following definition:
public class RedditMembershipProvider : MembershipProvider
{
public RedditMembershipProvider()
{
}
public override int PasswordAttemptWindow
{
get { return 10; }
}
/* snip all the similar properties definition
*/
}
The issue is I want when the RedditMembershipProvider
is instantiated, I want all the properties to be read from the web.config, not from the code definition above:
<membership defaultProvider="RedditMembershipProvider">
<providers>
<clear/>
<add name="RedditMembershipProvider"
type="RedditClone.Models.RedditMembershipProvider"
PasswordAttemptWindow=20
/>
</providers>
</membership>
So when I call the PasswordAttemptWindow
from the View, I should get 20, not 10. But now I am getting 10, not 20.
Any idea how to solve this problem?