Search code examples
sharepointsharepoint-2010forms-authenticationforgot-passwordclaims

SharePoint 2010 Claims Auth/FBA - Reset password not working


I have a SP site with Claims Authentication and FBA setup. Dual auth Win/Forms is working perfectly.

I have a asp:PasswordRecovery control on app page. It appears to lookup the account correctly - returning 'not found' messages if the username is not found. However, it fails to reset the password with the following execption:

Exception information: 
   Exception type: NotImplementedException   
   Exception message: The method or operation is not implemented.   


Thread information: 
Thread ID: 10 
Thread account name: SERVER01\SPS_Farm 
Is impersonating: False 
Stack trace:    at    Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider.GetUser(String name, Boolean userIsOnline)  
at System.Web.Security.MembershipProvider.GetUser(String username, Boolean userIsOnline, Boolean throwOnError)  
at System.Web.UI.WebControls.PasswordRecovery.AttemptSendPasswordUserNameView()  
at System.Web.UI.WebControls.PasswordRecovery.OnBubbleEvent(Object source, EventArgs e)  
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)  
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)  
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)  

Thanks in advance.

Update:
I added:
enablePasswordReset="true"
to the app web.config AND the token-service web.config

Wrote some some code to do a manual test, and still got this when my code tried to 'reset' the password:
This provider is not configured to allow password resets. To enable password reset, set enablePasswordReset to "true" in the configuration file.


Solution

  • This may not help since you seem to be looking up the user properly... but if you aren't doing this I know you can run into not implemented issues:

    Make sure to get an instance of the user using the appropriate Membership Provider.

    e.g.

    MembershipUser myUser = Membership.Providers["aspMembership"].GetUser(userName, false);
    

    Hope this helps.