Hi,
Here is my web.config setting :
<membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="15">
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" connectionStringName="MyLocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</membership>
i have set the requiresQuestionAndAnswer="true" in web.config.
When user want to reset the password (when they are not logged in) they must have to enter the password answer to reset the password,
that is working perfectly fine.
But, when user logged in and if they want to change the password, i don't wanna ask the user to enter the password answer. Only current password, new password and confirm new password.
But when i tried to change the password, it's throwing error that it requires password answer to change the password.
So for one module i want requiresQuestionAndAnswer="true" and for another i want requiresQuestionAndAnswer="false".
How i can set this value to requiresQuestionAndAnswer from my code behind or any other way so i can handle the both situations.
Thanks.