MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Password Recovery Error (Closed) (Mono Support )

Viewed 26950 time(s), 14 post(s) 12/23/2011 6:56:42 PMby grant.stone007
khorvat

khorvat

12/31/2011 10:50:51 AM
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
Rated 5.00, 1 vote(s). 
15993 Reputation 2214 Total posts
grant-stone007

grant.stone007

12/23/2011 6:56:42 PM
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)

This content has not been rated yet. 
647 Reputation 69 Total posts
khorvat

khorvat

12/23/2011 8:54:17 PM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts
grant-stone007

grant.stone007

12/26/2011 5:18:26 PM
DB resources.
This content has not been rated yet. 
647 Reputation 69 Total posts
khorvat

khorvat

12/27/2011 10:33:42 AM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts
grant-stone007

grant.stone007

12/28/2011 3:15:03 AM
Both already exist in tables LocalizationSource and LocalizationString.
This content has not been rated yet. 
647 Reputation 69 Total posts
khorvat

khorvat

12/29/2011 3:58:16 PM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts
grant-stone007

grant.stone007

12/30/2011 3:16:05 AM
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.
This content has not been rated yet. 
647 Reputation 69 Total posts
khorvat

khorvat

12/30/2011 8:19:56 AM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts
grant-stone007

grant.stone007

12/30/2011 2:21:47 PM
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?
This content has not been rated yet. 
647 Reputation 69 Total posts
grant-stone007

grant.stone007

12/30/2011 2:57:21 PM
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?
This content has not been rated yet. 
647 Reputation 69 Total posts
1 2