The DataSourceKey [XXX] is not defined.


Author
Message
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
The full error I am getting is:

   An error occurred while creating a new DataLayer for the business object.

   The DataSourceKey [XXX] is not defined.



This error is generated on the call to:

SFSPreferencesBO.RetrieveSecurityPreferences()



Everything works fine* when I don't add a named datasourcekey but leave the default "" :

SecurityBasics.SecurityDataSourceKey = "XXX"



I tried adding this but it didnt help:

DataLayer.DataSources.Add(New SqlDataSourceItem("XXX", "Data Source=IPADDRESS\SQLNAME;Initial Catalog=DBNAME;Integrated Security=True;Persist Security Info=False;Asynchronous Processing=True"))



I have a security project with a security key that matches.



I have my security tables in the same database as my application files, added via the DDT and deployed to the SQL Server.



I am sure I am doing something dumb, as this is the first chance i have had to implement the security module.



Keith



* when I left the SecurityDataSourceKey = "", I could only see the users within my app, when I called up the SecurityDialog from within VS, I saw no users.




Keith Chisarik
Replies
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
The above should say "permissions" not "roles" as far as the design time questions.



<< still hoping for an edit capability on ones own posts>>

Keith Chisarik
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
I have my security tables in the same database as my application files, added via the DDT and deployed to the SQL Server.

Then you do not need to set the SecurityDataSourceKey as the security key will reference your application database or default connection.

and i cant see my "live" users (created from within the SecuritDialog within my app) from within VS.

The first question is that did you deploy your users to your application database?  By default this will be empty.  Also, make sure you call the SecurityBasics.SetSecurityKeyAndVectorForUserAuthentication("yourPresharedKey") in the InitApplication otherwise you will not see any user.  In fact, you will get an error.

This also brings me to another question, are security roles then only available for add/edit at design time, that doesn't seem right?

No.  You cannot create permissions as run-time.  This would not make sense since the end-users should not be able to create permissions.  If the end-user created the permissions they would never be implemented within the code (or tested on by you the developer).  They would just be "hollow" permissions that did not do anything.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search