Mono Support Password Recovery Error (Closed)

Viewed 29505 time(s), 14 post(s), 12/23/2011 6:56:42 PM - by grant.stone007
12/31/2011 10:50:51 AM
15993 Reputation 2214 Total posts

Hi,

yes there was a change in the flow because in previous version password recovery had a small flaw that we needed to get fixed. I hope your application will be up and running by the 01.01.2012 so let us know if you need anything else.

Happy new year to you and your family.

Regards

1
12/23/2011 6:56:42 PM
647 Reputation 69 Total posts

I am getting an error on the password recovery page (/membership/passwordrecovery.aspx) when submitted. The error is being logged in the Application log file. see below.

I have not made any customization to this feature's pages or controls. I hope you can help me remedy the error.

2011-12-23 11:23:31,906 [14] ERROR MonoX [24.160.77.208] - Value cannot be null.
Parameter name: format
at System.String.Format(String format, Object arg0, Object arg1, Object arg2)
at MonoSoftware.MonoX.ModuleGallery.PasswordRecovery.OnPasswordRequestSending(String username, CancelEventArgs args)

2
12/23/2011 8:54:17 PM
15993 Reputation 2214 Total posts

Hi,

can you just point me out, do you use DB resource provider for the localization or you use ordinary resx resources ? You can check the resource provider in the web.config.

Regards

3
12/26/2011 5:18:26 PM
647 Reputation 69 Total posts

DB resources.

4
12/27/2011 10:33:42 AM
15993 Reputation 2214 Total posts

Hi,

can you please check if you have these two resources in the Portal Localization section (Admin area):

DefaultResources

Email_PasswordRecoveryRequest_HtmlContent
Email_PasswordRecoveryRequest_PlainContent

If you don't have them please add them here are the values for the above resources

Email_PasswordRecoveryRequest_HtmlContent
 
Dear <i>{0}</i>, we have just received a password retrieval request for your username at {1}.
<br /><br />
Please click here to change your password: <b>{2}</b>
<br /><br /><br />
Sincerely,
<br /><br />
Your {1} team

Email_PasswordRecoveryRequest_PlainContent
 
Dear {0}, we have received a password retrieval request for your username at {1}.
 
Please click here to change your password: {2}
 
 
Sincerely,
 
Your {1} team


Regards

5
12/28/2011 3:15:03 AM
647 Reputation 69 Total posts

Both already exist in tables LocalizationSource and LocalizationString.

6
12/29/2011 3:58:16 PM
15993 Reputation 2214 Total posts

Hi,

 we won't investigate this issue until we are sure that we have proper DB resource provider version. I think that this is probably caused by the .NET obsolete methods used in the DB resource provider as I previously mentioned.

Regards

7
12/30/2011 3:16:05 AM
647 Reputation 69 Total posts

I understand how this may be related to the DB resource issue and that you may have a update next week.

My portal is going Live on 01/01/12 and password recovery not working could be a problem for me. Would it be possible for you to share with me some of the codebehind logic for password recovery so that I could put together my own custom workaround until the root issue get resolved?

Thank you.

8
12/30/2011 8:19:56 AM
15993 Reputation 2214 Total posts

Hi,

you can fix the issue by setting the following properties:

passwordRecovery.MailRequestTemplateHtml
passwordRecovery.MailRequestTemplatePlainText


you can use the templates that I have posted earlier and put them into these properties. Try to set them on PageLoad. Another approach would be to inherit the password recovery module and to override the protected virtual void OnPasswordRequestSending(string username, CancelEventArgs args). Then you can set the properties just before the call to the base.OnPasswordRequestSending.

Let me know if this has fixed your issue, if not we will provide you with another solution.

Regards

9
12/30/2011 2:21:47 PM
647 Reputation 69 Total posts

In attempting to implement an override of the OnPasswordRequestSending method I realized that my records in the LocalizationSource were indeed incorrect. I apologize for incorrectly stating they were present. In fact the ResourceKey value of the records in my database were slightly different. The values were...

Email_PasswordRecovery_HtmlContent
Email_PasswordRecovery_PlainContent

and not...

Email_PasswordRecoveryRequest_HtmlContent
Email_PasswordRecoveryRequest_PlainContent

I changed to the correct values and now Password Recovery feature works as-is.

I do not know where the disconnect in the values came about. I am pretty sure that in the past this feature worked and some update it became broke. Did I miss a DB update script along the way?

10
12/30/2011 2:57:21 PM
647 Reputation 69 Total posts

I now have an issue downstream from the password recovery email. The password recovery email has a link in it. I click on the link, it goes to a page where I suppose I am to enter in a new password and repeat password. When I click send I get error shown below.

2011-12-30 09:28:06,986 [152] ERROR MonoX [::1] - Value cannot be null.
Parameter name: format
at System.String.Format(String format, Object arg0, Object arg1, Object arg2)
at MonoSoftware.MonoX.ModuleGallery.PasswordRecovery.OnPasswordSend(String username, CancelEventArgs args)

I presume I have another set of resources with incorrect Resource Keys and data values. Could you please provide me with all db resources pertaining to password recovery so I can synchronize my db records?

11
1 2
This is a demo site for MonoX. Please visit Mono Software for more info.