StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
Role Based Security
»
SecurityDataSourceKey :)
SecurityDataSourceKey :)
Post Reply
Like
3
SecurityDataSourceKey :)
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Marek Jablonski
Marek Jablonski
posted 14 Years Ago
ANSWER
Topic Details
Share Topic
Group: StrataFrame Users
Posts: 2,
Visits: 22
Hello guys,
I am newbe and of course have trouble
I made my own datasource class to connecting postgres db.
Everything is ok, but i cant use RBAC becasue.
I have two errors:
1. If i correct understud i need indicate datasourcekey
DataLayerException
An error occurred while creating a new DataLayer for the business object.
DataLayerException
The DataSourceKey [] is not defined.
Source : MicroFour StrataFrame Business
Stack Trace:
w MicroFour.StrataFrame.Data.DataLayer.Create(BusinessLayer BusinessObject, ISynchronizeInvoke SyncObject, Boolean CheckDesignTime)
w MicroFour.StrataFrame.Business.BusinessLayer.get__DataLayer()
w MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(DbCommand CommandToExecute)
w MicroFour.StrataFrame.Security.BusinessObjects.SFSUsersBO.FillByUserName(String UserName)
w MicroFour.StrataFrame.Security.Login.AuthenticateUser(String Username, String Password, String Domain, SFSUsersBO& User)
w MicroFour.StrataFrame.Security.Login.AttemptLogin(Object sender, EventArgs e)
w MicroFour.StrataFrame.Security.LoginForm.OnAttemptLogin()
w System.Windows.Forms.Control.OnClick(EventArgs e)
w System.Windows.Forms.Button.PerformClick()
w System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
w System.Windows.Forms.Control.PreProcessMessage(Message& msg)
w System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
w System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
2. After set this: SecurityBasics.SecurityDataSourceKey = STR_PgSQL
I have cast error
InvalidCastException
Nie można rzutować obiektu typu 'Devart.Data.PostgreSql.PgSqlConnection' na typ 'System.Data.SqlClient.SqlConnection'.
Source : System.Data
Stack Trace:
w System.Data.SqlClient.SqlCommand.set_DbConnection(DbConnection value)
w MicroFour.StrataFrame.Data.DbDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)
w MicroFour.StrataFrame.Data.DataLayer.GetDataTable(DbCommand Command, Boolean RegisterNotification)
w MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(DbCommand CommandToExecute)
w MicroFour.StrataFrame.Security.BusinessObjects.SFSUsersBO.FillAll(Int32 ProjectPK)
w MicroFour.StrataFrame.Business.BusinessLayer.raise_ParentFormLoading()
w MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.InitializeFormLoadObjects()
w MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.OnLoad(EventArgs e)
w System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
w System.Windows.Forms.Control.CreateControl()
w System.Windows.Forms.Control.WmShowWindow(Message& m)
w System.Windows.Forms.Control.WndProc(Message& m)
w System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
w System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
looking for help please,
Sorry for gramma i still learn
Regards Mario
Tags
postgres db
RBAC
Reply
Like
3
Greg McGuffey
Greg McGuffey
posted 14 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 2K,
Visits: 6.6K
RBS only supports SQL server 2005+. The BOs used by security all use SqlCommand objects (which is why your getting the cast error). You can use separate databases for security and your app data though, so you could setup a SQL server instance just for security, then use Postgres for your data.
Reply
Like
2
Marek Jablonski
Marek Jablonski
posted 14 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame Users
Posts: 2,
Visits: 22
THanks for quick replay.
I am sad :{
Reply
Like
2
Ivan George Borges
Ivan George Borges
posted 14 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
No need to be, Mario!
It is a very simple task, and you can use an Express version of SQL Server just to house the security tables. the Database Deployment Toolkit will take care of creating the tables for you on the server. You set the SecurityDataSourcekey on your application and you are done.
Reply
Like
2
Russell Scott Brown
Russell Scott Brown
posted 14 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 124,
Visits: 597
Thanks. I didn't know this was possible but I guess it makes sense just never thought about it.
I am planning on writing applications that use VistaDB but the DDT and RBS don't work with it but this seems like an easy and cheap workaround.
Any plans for Strataframe to open up the DDT and RBS to non-SQL Server databases in 2011?
Russ Brown (Using C#2010/SQL Server 2008)
Reply
Like
2
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
3
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search