Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tom 713 posts 954 karma points
    Mar 09, 2010 @ 23:16
    Tom
    0

    PasswordRecoveryControl Not Working

    Hi All,

    I'm trying to implement the password recovery control and am getting the following exception when trying to reset a users password where [email protected] is a valid member username:

     

    Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

     

    stack trace

         umbraco.providers.dll!umbraco.providers.members.Helper.GuidPseudoTryParse(string guidToTest = "[email protected]") Line 15 + 0x1e bytes    C#

         umbraco.providers.dll!umbraco.providers.members.Helper.GetMemberByUsernameOrGuid(string userNameOrGuid = "[email protected]") Line 31 + 0xd bytes    C#

      umbraco.providers.dll!umbraco.providers.members.UmbracoMembershipProvider.GetUser(string username = "[email protected]", bool userIsOnline = false) Line 583 + 0xa bytes    C#

     

    most odd. has anyone encountered this before? im using 4.0.3

     

     

     

     

    my web.config:

    <add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="TestType" />
            <add name="AspNetSqlMemberShipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="LocalSqlServer" />
            <add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="false" />

     

     

    the control itself:

    <asp:UpdatePanel ID="PasswordResetUpdatePanel" runat="server">
        <ContentTemplate>
            <asp:PasswordRecovery ID="PasswordRecoveryControl" runat="server" MailDefinition-Subject="Password Reset For Company Name"
                CssClass="password-reset" MembershipProvider="UmbracoMembershipProvider" FailureTextStyle-CssClass="error"
                ValidatorTextStyle-CssClass="error" UserNameFailureText="Your membership details could not be found. Please try again."
                MailDefinition-BodyFileName="~/Email/PasswordResetEmailBody.html" MailDefinition-IsBodyHtml="True">
                <UserNameTemplate>
                    <asp:Label ID="UserNameLabel" Text="Email Address:" AssociatedControlID="UserName" CssClass="grey" runat="server" /><br/>
                        <asp:TextBox ID="UserName" CssClass="field" ValidationGroup="ResetGroup" runat="server" />
                                        <asp:RegularExpressionValidator ID="UserNameRegexValidator" ValidationGroup="ResetGroup" CssClass="message-label-negative"
                                            ControlToValidate="UserName" Display="dynamic" ErrorMessage="<br/>Please enter a valid email address." ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                            runat="server" />
                                        <asp:RequiredFieldValidator ID="UserNameRequiredFieldValidator" CssClass="message-label-negative" ValidationGroup="ResetGroup"
                                            ControlToValidate="UserName" Display="dynamic" ErrorMessage="<br/>Please enter an email address." runat="server" />
                            <div class="clear"></div>
                            <div class="panel-submit">
                                <asp:ImageButton ID="ResetPasswordSubmitButton" ImageUrl="~/images/login-panel/reset-password-button.gif" CommandName="Submit" ValidationGroup="ResetGroup" CssClass="login-button"
                                    AlternateText="Reset Password" runat="server" />
                            </div>
                            <div class="message-label-negative">
                            <asp:Literal ID="FailureText" runat="server" EnableViewState="False"/>
                            </div>
                </UserNameTemplate>
                <SuccessTemplate>
                    <div class="message-label">
                        Your password has been sent to the email address supplied.
                    </div>
                </SuccessTemplate>
            </asp:PasswordRecovery>
        </ContentTemplate>
    </asp:UpdatePanel>           

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Mar 10, 2010 @ 00:26
    Aaron Powell
    0

    Can you post the full stack trace? I've just had a look at the source and it does a test if the username is a guid or not, but it catches a FormatException and then treats the username as non-GUID.

    I don't know how you'd be getting an error at that point in the form of a FormatException.

  • Tom 713 posts 954 karma points
    Mar 10, 2010 @ 00:36
    Tom
    0

    My Bad!

    no worries i had forgotten to copy the html email template across! checked the db log!

    Thanks Slace!

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Mar 10, 2010 @ 04:43
    Aaron Powell
    0

    Awesome, as I have no idea who my post offered that insight :|

Please Sign in or register to post replies

Write your reply to:

Draft