PasswordRecovery not working properly?

Rate It (1)

Last post 01-11-2008 3:57 AM by XiaoYong Dai – MSFT. 5 replies.

Sort Posts:

  • PasswordRecovery not working properly?

    01-06-2008, 10:05 PM
    • Member
      7 point Member
    • dmoreitz
    • Member since 09-21-2007, 4:35 AM
    • Posts 23

    Hi All,

     I have a PasswordRecovery control on a page, but it is not working. Here is my web.config entry:

     

    <membership defaultProvider="yyySqlMembershipProvider" userIsOnlineTimeWindow="20">
            <providers>
              <clear/>
              <add name="yyySqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="yyyConnectionString" applicationName="yyy" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="true" passwordFormat="Hashed"/>
            </providers>
          </membership>

     

    The problem is that when I go to the page with the PasswordRecovery control, I NEVER see the question & answer dialog, I always see the "resend password" dialog where I have to enter my username. Since passwords are hashed this fails.

    My PasswordRecovery control looks like this:

    <asp:PasswordRecovery ID="recoverMain" runat="server" BackColor="#F7F6F3" BorderColor="#E6E2D8"
            BorderPadding="4" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana"
            Font-Size="0.8em">
            <InstructionTextStyle Font-Italic="True" ForeColor="Black" />
            <SuccessTextStyle Font-Bold="True" ForeColor="#5D7B9D" />
            <TextBoxStyle Font-Size="0.8em" />
            <TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" Font-Size="0.9em" ForeColor="White" />
            <SubmitButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
                BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284775" />
        </asp:PasswordRecovery>
     

    I am using the standard SQL tables created via aspnet_regsql, and everything else works (login, change password, profile object, etc).

    Thoughts?

    :-)

    Thanks!

    Filed under:
  • Re: PasswordRecovery not working properly?

    01-06-2008, 10:46 PM
    • Star
      8,182 point Star
    • Careed
    • Member since 06-24-2002, 7:37 AM
    • Lubbock, TX
    • Posts 1,597
    You should look into using the QuestionTemplate with its associated properties.  Look here for more details: PasswordRecovery.QuestionTemplate Property
    Christopher Reed
    "The oxen are slow, but the earth is patient."
  • Re: PasswordRecovery not working properly?

    01-07-2008, 8:13 AM
    Answer
    • Contributor
      2,117 point Contributor
    • dharnendra
    • Member since 12-26-2007, 5:04 AM
    • Posts 395

     When you have hashed password,its not retrievable.

    Refer this, http://www.odetocode.com/Articles/427.aspx. 

    Shah Dharnendra G
    Sr.Analyst Programmer,
    GTL-Ahmedabad
  • Re: PasswordRecovery not working properly?

    01-07-2008, 10:50 AM
    Answer
    • Star
      8,182 point Star
    • Careed
    • Member since 06-24-2002, 7:37 AM
    • Lubbock, TX
    • Posts 1,597

    No, but you can still reset the password and get a new one.

    Christopher Reed
    "The oxen are slow, but the earth is patient."
  • Re: PasswordRecovery not working properly?

    01-08-2008, 12:17 AM
    • Member
      7 point Member
    • dmoreitz
    • Member since 09-21-2007, 4:35 AM
    • Posts 23

    Thanks, I know that, which is why I don't want to retrieve it.

     My question is, why is it not showing the question / answer block to have the system reset the password?

     

  • Re: PasswordRecovery not working properly?

    01-11-2008, 3:57 AM

    dmoreitz:

     My question is, why is it not showing the question / answer block to have the system reset the password?

     

    Hi

    You can set the requiresQuestionAndAnswer property to false.

         <membership>

           <providers>

             <remove name=AspNetSqlMembershipProvider/>

             <add name=AspNetSqlMembershipProvider

                 type=

                 connectionStringName=LocalSqlServer

                 enablePasswordRetrieval=false

                 enablePasswordReset=true

                 requiresQuestionAndAnswer=false

    Best Regards
    XiaoYong Dai
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (6 items)