views:

339

answers:

1

I'm building a small website which will have FBA enabled (SqlMembershipProvider) and I want signup to be as simple as possible, just a prompt for username (email address) and password.

How do I remove the security question from the create user control?

+2  A: 

My bad, I jumped the gun on that one.

It looks like the control will sense if the underlying provider required a question and answer. So, have you tried disabling it in the web.config?

<add
  name="AspNetSqlMembershipProvider"
  type="System.Web.Security.SqlMembershipProvider, ..."
  connectionStringName="LocalSqlServer"
  enablePasswordRetrieval="false"
  enablePasswordReset="true"
  **requiresQuestionAndAnswer="false"**
  applicationName="/"
  requiresUniqueEmail="false"
  passwordFormat="Hashed"
  maxInvalidPasswordAttempts="5"
  minRequiredPasswordLength="7"
  minRequiredNonalphanumericCharacters="1"
  passwordAttemptWindow="10"
  passwordStrengthRegularExpression=""
/>

Wrong answer below:


Set the QuestionAndAnswerRequired property to false.

matt eisenberg
and how do you propose the setting of a protected internal read-only property?
Slace
Edited my earlier non-answer.
matt eisenberg
the membership section is not present in my web.config, should I add it manually? if so, what is the right "connectionStringName" to use?
rec