password recovery in claim based authentication RRS feed

  • Question

  • guys, i need your help...

    i setup web application using claim based + sqlmembership..

    in  a form, i got password recovery control..

    so, how can i retrieve the user password ???

    currently, when i click submit button, i got an error as follow :

    [NotImplementedException: The method or operation is not implemented.] Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider.GetUser(String name, Boolean userIsOnline) +62 System.Web.Security.MembershipProvider.GetUser(String username, Boolean userIsOnline, Boolean throwOnError) +35 System.Web.UI.WebControls.PasswordRecovery.AttemptSendPasswordUserNameView() +120 System.Web.UI.WebControls.PasswordRecovery.OnBubbleEvent(Object source, EventArgs e) +127 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +70 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981

    p/s: note that i'm using sharepoint 2010 RTM and successfully configure smtp in server...

    thanks in advance....

    Wednesday, June 2, 2010 1:48 AM

All replies

  • got the same problem, created a plain asp.net page, set up smtp on iis and so on. The strange thing is, why does it use the SPClaimsAuthMembershipProvider, is there something in the web.ini that could be set up to use the System.Web.security directly?
    Monday, June 7, 2010 10:38 AM
  • i solved thies problem by identify membership provider name in password recovery control...


    <asp:PasswordRecovery ID="PasswordRecovery1" runat="server"
                    OnSendingMail="PasswordRecovery1_SendingMail" UserNameLabelText="User ID: "
                    UserNameInstructionText="Enter your User ID to receive your password."
                    UserNameRequiredErrorMessage="User ID is required."
                    MembershipProvider="providername ">


    but now i facing problem to change password....

    always got message

    Password incorrect or New Password invalid.
    New Password length minimum: 7.
    Non-alphanumeric characters required: 1.

    even i enter the right password...

    Tuesday, June 22, 2010 2:38 AM
  • works for me as well

    Thursday, June 24, 2010 2:27 PM
  • Hi oman5980,


    I have just done something like you expose in a proyect, and the problem is that the SPClaimsAuthenticationMembershipsProvider class doesn't impements the method GetUser(string name, boolean userIsOnline), but only implements GetUser(object userId, boolean userIsOnline).


    A solution could be to create a class that inherits from SPClaimsAuthenticationMembershipProvider and overwrite this method.



    Tuesday, July 6, 2010 3:14 PM
  • Hi Oman5980

    I've got the same error "Password incorrect or New Password invalid".£
    Did you already found the solution for this?

    Kind regards,

    Wednesday, August 25, 2010 3:17 PM
  • Has any one found the solution to this issue?


    "Password incorrect or New Password invalid. New Password length minimum: 7. Non-alphanumeric characters required: 1."

    I thought i may need this in the app web.config passwordStrengthRegularExpression=""


    but still cant seem to get password reset to work..

    Wednesday, October 20, 2010 11:19 AM
  • I had this same problem with the Change Password control and also ran across this in the Password Recovery control.

    The message you are getting is a generic messae for any type of password reset failure.

    Your failure may actually be the way the username is being passed back to the membership provider.

    The best way to configrm this is enter the full user account i.e. i:0#.f|fbamembership|test1 in the username box and see if that works.

    If this reoslves your issue then you will have to add some code to your submit button to append the membership provider information to the username.

    Monday, October 25, 2010 9:52 PM
  • I am having similar issues with ChangePassword control.

    I have set DisplayUserName = true in the control, and its 0#.f|fbamembershipprovider|c_user in the User Name text box of the control.

    Please let me know, how to fix this.


    Aritra Saha
    Tuesday, October 26, 2010 10:23 AM
  • Aritra

    Try this: Remove everything before the username so the only value in the Username field would be c_user. Try and change the password and see if that works.

    If that works then what you will have to do is use a little code in the Page_Load event and you will be all set.

    The code you will need is something like this:







    Hope this solves your issue

    void Page_Load(object sender, EventArgs e)



    ChangePassword1.UserName = User.Identity.Name.Split('|')[2];
    Wednesday, October 27, 2010 12:46 AM
  • Anitra

    Try just using "c_user" as the User Name and see if you can change the password. If this works then you have found the problem. The next problem is no one wants to have a user see all of the membership garbage before the username. What you can do in the Page_Load event  is enter this:


    ChangePassword1.Username = User.Identity.Name.Split('|')[2];


    Hope this works for you

    • Edited by Robert Revere Wednesday, October 27, 2010 12:54 AM Spelling
    Wednesday, October 27, 2010 12:53 AM
  • Hi there,

    I have implemented the ChangePassword control in my claims based site and got it to work using Robert's solution above.  I.e. The password is changed successfully.  However, if I then try to Sign Out or Sign in as Different User, I get a 500 Internal Server Error.  I then can't even browse to the default login page from the same machine (I get the same 500 error) until about a half an hour later...

    Any clue what could be going on here?

    Thanks in advance,


    Thursday, February 3, 2011 2:32 PM
  • Amy

    I believe your issue is with either persistent cookie or your token issued by STS. Do not know which without knowing the details of your environment, so take a look at both settings in either IIS, the STS web.config, or web app web.config.

    Also try reading this article to see if it provides any assistance



    Thursday, February 3, 2011 3:50 PM
  • Thanks for the prompt response Robert.  It's very much appreciated.

    I had a look at the article you pointed out above.  I followed the steps to update STS to work with session cookies and it seemed to help a bit...  What happens now is that I can change the password successfully, but I still get the same error if I try to Sign Out or Sign in as Different User.  However, if I then close the browser and re-open it, I am then able to sign in again using the new password.

    I wonder I need to programmatically update the cookie after a password is changed?  Is that possible?  What do you think?



    Thursday, February 3, 2011 4:36 PM
  • Here are a couple other areas to check as this is a general error and can be a number of areas that is causing this

    1. Check to see how your browser is handling credentials
    2. Are you clicking the Remember me next time check box?
    3. Are you using AAM (Alternate Access Mappings)
    4. Review the ULS logs and see if that returns any errors to assist with finding the true cause
    Thursday, February 3, 2011 4:56 PM
  • Hi Robert,

    I've checked the areas that you mentioned.

    1. The browser (IE8) is set to Automatic logon with current user name and password.
    2. I don't disply the Remember me check box, so I assume it defaults to false.
    3. I am not using AAM.
    4. Checking the logs shows the following message:

    System.ArgumentException: Exception of type 'System.ArgumentException' was thrown.  Parameter name: encodedValue    at Microsoft.SharePoint.Administration.Claims.SPClaimEncodingManager.DecodeClaimFromFormsSuffix(String encodedValue)     at Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.GetProviderUserKey(String encodedSuffix)     at Microsoft.SharePoint.ApplicationRuntime.SPHeaderManager.AddIsapiHeaders(HttpContext context, String encodedUrl, NameValueCollection headers)     at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.PreRequestExecuteAppHandler(Object oSender, EventArgs ea)     at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&... 05f6af6b-fe7a-47f3-8cca-ccf81f368240



    Thursday, February 3, 2011 6:53 PM
  • I hit exactly the same problem as you today and struggled for a day to fix the problem.

    With fiddler, I noticed that the 'FedAuth' Cookie was removed when I signout but not the '.ASPXAUTH' cookie, which was created by the ChangePassword aspnet control.  In other words, the presence of the '.ASPXAUTH' cookie most probably caused the crash of the claim provider of Sharepoint Server.  So deleting this cookie after successful password change should solve the problem.  Someone suggested using the code request.cookies.clear(), but this did not work for me.  Finally, I follow the method of deleting cookie from technet and the problem was gone.  Here the changes I made:

    on ChangePassword.aspx, add the OnChangedPassword event:

    <asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">

    <asp:ChangePassword id="myChangePassword" OnChangedPassword="ChangePassword_Clear"


    On ChangePassword.apsx.cs, add the codes to delete the cookie '.ASPXAUTH'

    namespace CustomLogin.Layouts


        public partial class ChangePassword : System.Web.UI.Page


             protected void Page_Load(object sender, EventArgs e)


                myChangePassword.UserName = User.Identity.Name.Split('|')[2]; 


            protected void ChangePassword_Clear(object sender, EventArgs e)


                HttpCookie aspCookie = new HttpCookie(".ASPXAUTH");

                aspCookie.Expires = DateTime.Now.AddDays(-1);





    Hope this help.

    Friday, March 11, 2011 1:25 PM