StrataFrame Forum

Localization and Role Based Security

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

By Guy - 1/11/2007

Hi, I'm having a problem with localization and role based security. Basically I'm getting the following error when a security message needs to be shown:

MicroFour.StrataFrame.UI.LocalizationKeyNotFoundException was unhandled by user code
  Message="The specified key [SFSM_PasswordAuthenticationFailed] was not found within the messaging database."
  Source="MicroFour StrataFrame Base"
  StackTrace:
       at MicroFour.StrataFrame.UI.Localization.RetrieveMessage(String MessageKey)
       at MicroFour.StrataFrame.Messaging.MessageForm.ShowMessageByKey(String MessageKey, Object[] ReplacementValues)
       at MicroFour.StrataFrame.Messaging.MessageForm.ShowMessageByKey(String MessageKey)
       at shiftCube.Client.Windows.Forms.shiftCubeLogin.MicroFour.StrataFrame.Security.ILoginForm.ShowAuthFailedMessage() in D:\DevData\Visual Studio 2005\Projects\mindCube\shiftCube\shiftCube.Client.Windows\Forms\shiftCubeLogin.cs:line 257
       at MicroFour.StrataFrame.Security.Login.AttemptLogin(Object sender, EventArgs e)
       at shiftCube.Client.Windows.Forms.shiftCubeLogin.OnAttemptLogin() in D:\DevData\Visual Studio 2005\Projects\mindCube\shiftCube\shiftCube.Client.Windows\Forms\shiftCubeLogin.cs:line 35
       at shiftCube.Client.Windows.Forms.shiftCubeLogin.cmdOk_Click(Object sender, EventArgs e) in D:\DevData\Visual Studio 2005\Projects\mindCube\shiftCube\shiftCube.Client.Windows\Forms\shiftCubeLogin.cs:line 296
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.PerformClick()
       at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
       at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
       at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
       at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
       at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)

My messaging files are embedded XML and the source xml files are located in a subdirectory called localization. Messages in this store appear correctly

Thanks
Guy Collinson

By StrataFrame Team - 1/11/2007

So, your own messages are fine, but the security messages are not found... what locale ID are you setting?

MicroFour.StrataFrame.UI.Localization.MessageLocaleID = ?

By Guy - 1/11/2007

1040 (Italian)
By StrataFrame Team - 1/11/2007

That would be the reason... we only have English (US), Portuguese (Brazil), and I think Spanish (Mexico) currently in the security.  However, as I look at our translations, we have German (Germany) and French (France) that are completed, but not yet included, and Italian (Italy) and Russian (Russia) pending translation (though our translator might have already gotten them to us and they might not be imported... I dunno). 

So, until we get the Italy stuff translated, you can stick to one of the languages that is included with security, or you can add your own Messages_1040.xml file to the MicroFour StrataFrame Security project and recompile it...