Configuring Create User Form Fields : providers « Authentication Authorization « ASP.NET Tutorial






The following web configuration file makes both an email address and security question and answer optional.

File: Web.Config

<configuration>
  <system.web>
    <authentication mode="Forms" />
    <membership defaultProvider="MyMembership">
      <providers>
        <add
          name="MyMembership"
          type="System.Web.Security.SqlMembershipProvider"
          connectionStringName="LocalSqlServer"
          requiresQuestionAndAnswer="false"
          requiresUniqueEmail="false" />
      </providers>
    </membership>
  </system.web>
</configuration>

If you add the web configuration file to your application, then the CreateUserWizard control does not render fields for a security question and answer.








21.13.providers
21.13.1.Configuring Create User Form Fields
21.13.2.Sending the Original Password
21.13.3.Requiring a Security Question and Answer
21.13.4.Using Templates with the PasswordRecovery Control