StrataFrame Forum

Security application

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

By Jason Jarvis - 9/28/2006

When using Role Based Security, how do I embed the Security Application into my own application?
By Trent L. Taylor - 9/28/2006

This is actually quite easy.  To call the security dialog within your application just do the following:

  1. Make sure that a reference to MicroFour StrataFrame Security.dll exists within your project
  2. To call the security application, add the following code in a menu item or button someplace:

Dim loDialog As New MicroFour.StrataFrame.Security.SecurityDialog()

loDialog.ShowDialog()

By Jason Jarvis - 9/28/2006

I have incorporated this but when I click on the button I get the following exception.

LocalizationKeyNotFoundException
 The specified key [SFSTText - None] was not found within the localization database.
FileNotFoundException
 The file [Message_Languages.xml] could not be found.  The localization languages table could not be loaded.

Source     : MicroFour StrataFrame Base

Stack Trace:
   at MicroFour.StrataFrame.UI.Localization.LoadLanguageTable(Boolean IgnoreExceptions)
   at MicroFour.StrataFrame.UI.Localization.LoadXmlFile(Int32 LocaleID)
   at MicroFour.StrataFrame.UI.Localization.GetKeyRowFromXml(String Key)
   at MicroFour.StrataFrame.UI.Localization.RetrieveTextValue(String TextValueKey)
   at MicroFour.StrataFrame.Security.SecurityDialog..ctor(Int32 ProjectPK, ShowProjectPropertiesDeleg ShowProjectProperties, CreatePermissionEditor CreatePermEditor)
   at MicroFour.StrataFrame.Security.SecurityDialog..ctor()
   at EVDA.Form1.Button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\Jason\My Documents\Visual Studio 2005\Projects\EVDA\EVDA\Form1.vb:line 4
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

By StrataFrame Team - 9/29/2006

The localiztion text values are stored as embedded resource files within the MicroFour StrataFrame Security.dll assemly, but for some reason, the assembly is not extracting them from the resources when the assembly is loaded into the AppDomain.  I will let you know why that is happening when I figure it out.  Thanks.