StrataFrame Forum

Error messages localization keys?

http://forum.strataframe.net/Topic23449.aspx

By dgsoft - 6/10/2009

Hi,

I develop a web application and evaluate StrataFrame security dialogs for my web application.

For example.. when I want to change a password.. and my new password value brake a business rules I'v got an excelption on



Here little code block



loSFSUserBO.us_PasswordPlainText = lcNewPassword

loSFSUserBO.us_ConfirmPassword = lcNewPassword

Try

If loSFSUserBO.Save() = MicroFour.StrataFrame.Data.SaveUndoResult.Success Then

Response.Redirect("~/PenSolutionOffice.aspx")

Else

Me.mmks_ShowNotification(Error_ChangePassword)

End If

Catch ex As Exception

Me.mmks_ShowNotification(ex.InnerException.Message)

End Try







So.. I'v got a Catch block... and ex.InnerException.Message = The specified key [SFST_PasswordComplexityRequirements] was not found within the localization database.



I understand - the broken rule password is simple.. but where can I get SFST_PasswordComplexityRequirements ? Should I create in my localization XML ? but there a lot of diffrent SFST_ keys when diffrent rules are broken.



So, the question is - how can I get a valid error message instead SFST_PasswordComplexityRequirements...



Thanks!

Denis
By Trent L. Taylor - 6/12/2009

This relates to the same issue on another thread you had asked about this. You can refer back to that post here: http://forum.strataframe.net/FindPost23324.aspx. This is actually because you are requiring complex passwords based on your global settings and your password doesn't meet these requirements. So the broken rules are trying to create that message and you have not embedded the localization files in your assembly.