ASP.net SqlMembershipProvider: requiresQuestionAndAnswer set to false in web.config but RequiresQuestionAndAnswer is true at runtime

41 views
Skip to first unread message

Uri Goldstein

unread,
May 28, 2015, 3:16:43 AM5/28/15
to altnet...@googlegroups.com
With 0 answers on stackoverflow.com I'm starting to get desperate so cross-posting here :)

--------------------------------------------------------------------------
http://stackoverflow.com/questions/30462945/asp-net-sqlmembershipprovider-requiresquestionandanswer-set-to-false-in-web-con :


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?


Ken Egozi

unread,
May 28, 2015, 12:17:32 PM5/28/15
to altnet...@googlegroups.com
Per the comments on the question, the other membership provider might be defined on a lower level config file (applicationHost.config, or machine.config, probably the former).

Why they get confused together (as in some of the properties from one are applied over the other etc.) - no idea. Probably a bug in the membership provider.

Which in and by itself is more trouble than blessing in my experience.



--
You received this message because you are subscribed to the Google Groups "altnetisrael" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altnetisrael...@googlegroups.com.
To post to this group, send email to altnet...@googlegroups.com.
Visit this group at http://groups.google.com/group/altnetisrael.
For more options, visit https://groups.google.com/d/optout.

Uri Goldstein

unread,
May 31, 2015, 3:37:09 AM5/31/15
to altnet...@googlegroups.com
Many thanks Ken! You're an encyclopedia, man :)  The second provider did come from my machine config. Please answer the question on Stackoverflow.com so I can accept it.
Reply all
Reply to author
Forward
0 new messages