StrataFrame Forum

Need Help Real Bad With Security

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

By Douglas Riley - 10/29/2007

Hello all! I have read over and over the steps in the help file on implementing security in a Strataframe Win App, but I feel I am still missing a step or two w00t! I am working on an application where the SQL tables (application and Strataframe) exist on a remote server.  The application is set up for security (at project creation).  I am trying to add users, roles, etc. but I do not know if I needed to:

1) Design the application against a local database and populate the users, roles, etc. there, then export the data to the remote server

2) Use the Role-Based Editor to connect to the remote server and create users, roles, etc. (but I keep getting an error trying that)

3) Or do something else I am totally unaware of.

I feel I just do not know the process.  If anyone can help, I would appreciate it!! It already is going to be a long night! Crazy!

DPrimetime

By Ivan George Borges - 10/29/2007

Hi Douglas.

I will try to make your working night shorter, but no promises. Wink

It seems you have created your application with security. And the database is remote, but you do have access to it, of course. At developing time, you will have your Security tables in the SF database. So, your situation is just fine. Can you go to the StrataFrame menu and launch the Role Based Security Editor? If so, this is where you will create security project. In it, you will create your permissions, restrictions and set these keys into your application. 

You say you get an error when trying to use the RBS. You haven't changed the StrataFrame Data Store connection, have you? To check if you are pointing to the right place, have a look at the StrataFrame menu, Database Connection. This is not meant to be your application connection, this is where SF will store all of its tables, including Security tables.

Do you have the Database Deployment Toolkit? If so, it is going to be extremely easy to import your security data to a deployment package, including the data you created in it. There is a wizard in the RBS for data.

Hope it helps you in some way.

By Douglas Riley - 10/29/2007

Ivan,

Thank you so much for replying!  I have opened the Role Based Editor.  And my database connection is pointing to the remote server.  When I try to create a security project, I get the error:

DataLayerSavingException
  Invalid object name 'dbo.SFSProjects'.
SqlException
  Invalid object name 'dbo.SFSProjects'.

Source     : MicroFour StrataFrame Business

Stack Trace:
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader()
   at MicroFour.StrataFrame.Data.DbDataSourceItem.InternalExecuteReader(DbCommand Command, Boolean IsTransactional, String TransactionKey)
   at MicroFour.StrataFrame.Data.SqlDataSourceItem.UpdateRow(QueryInformation QueryInfo, DataRow RowToUpdate, ConcurrencyExceptionHandler ConcurrencyHandler, AddRowErrorHandler RowErrorHandler, Boolean RecreateCommand)
   at MicroFour.StrataFrame.Data.DbDataSourceItem.UpdateRow(QueryInformation QueryInfo, DataRow RowToUpdate, ConcurrencyExceptionHandler ConcurrencyHandler, AddRowErrorHandler RowErrorHandler)
   at MicroFour.StrataFrame.Data.DataLayer.UpdateDataTableThread(Object ThreadParams)
   at MicroFour.StrataFrame.Business.BusinessLayer.Save(Boolean Transactional, String TransactionKey)
   at MicroFour.StrataFrame.Business.BusinessLayer.Save()
   at MicroFour.StrataFrame.Security.ProjectDialog.cmdSave_Click(Object sender, EventArgs e)
   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)

SFSProjects is not suppose to be exported, correct?  Thanks!

Doug

By Ivan George Borges - 10/29/2007

Hey Douglas.

I believe you, but it does look like you have changed your StrataFrame Data Store Connection.

Have a look at this thread and see if it helps you:

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