In an ASP.net web application I have defined the following Membership provider in the web.config:
<membership>
<providers>
<add connectionStringName="MyServer" name="MyServer" type="System.Web.Security.SqlMembershipProvider"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
enablePasswordRetrieval="false" />
</providers>
</membership>
When I run the application in the debugger, the property Membership.Provider.RequiresQuestionAndAnswer
is true
.
Why? And how can I fix this?
Update: Ar tuntime, the Membership.Providers
collection contains two instances of Provider that are almost identical. The differences are:
Now trying to figure out where the first one is coming from.
Per the follow up question, the mystery providers is defined on a lower level config file, named machine.config, which is the server-wide parent config file for all asp.net sites running on the machine. See some more details at the MSDN page for asp.net config hierarchy.