RBS (Strataframe) database on a separate server


Author
Message
Jeff Pagley
Jeff Pagley
StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)
Group: StrataFrame Users
Posts: 223, Visits: 893
Hi SF Team,

How do I setup the DB connections in my app to point to the RBS (Strataframe) database on a different server than my user database.  Right now what I am doing is the following which is a connection string which points to the same server for both databases.

builder.DataSource = MyDataSource

builder.InitialCatalog = MyDataBase

builder.UserID = "sa"

builder.Password = MyPassword

DataLayer.DataSources.Add(New SqlDataSourceItem("", builder.ConnectionString))

Thanks,

Jeff


Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
There are two things you need to do differently when the security data is not in the same database as the rest of the app:



1. Make sure the key of the datasource that access the security tables differs from the key used by the rest of the app. The default key is an empty string (""). This is typically used for the main data source. You need to use a different one for the security datasource:



DataLayer.DataSources.Add(New SqlDataSourceItem("security", builder.ConnectionString))




The key is set to "security" in the line above.



2. Let the framework know that the security data is accessible via this datasource, by setting the SecurityDataSourceKey to the key you used when creating the data source for security:



SecurityBasics.SecurityDataSourceKey = "security"




Both of these are typically done the the SetDataSources method in AppMain.vb (program.cs).
Jeff Pagley
Jeff Pagley
StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)
Group: StrataFrame Users
Posts: 223, Visits: 893
Thank you Greg for the prompt response.  In looking into this further, what I also found was the following where the "MyEncryptionKey" value is what I used for the datasource key which matches my Security Key when I created my RBS project.

builderRBS.DataSource = MyDatabaseServer

builderRBS.InitialCatalog = "StrataFrame"

builderRBS.UserID = "sa"

builderRBS.Password = saPassword

DataLayer.DataSources.Add(New SqlDataSourceItem("MyEncryptionKey", builderRBS.ConnectionString))

SecurityBasics.SetSecurityKeyAndVectorForUserAuthentication("MyEncryptionKey")

The .SetSecurityKeyAndVectorForUserAuthentication sets my database connection and provides the security key to the RBS system.  I believe all I have to do now is change the .DataSource value and it should enable me to accomplish what I want orginally wanted.  Is this correct?

Jeff


Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Jeff,



The SecurityDataSourceKey and the SetSecurityKeyAndVectorForUserAuthentication are not the same thing.



The SecurityDataSourceKey is a key that is used to access a data source that contains the security tables/views used by RBS. The key is a string. If you look at the properties of a BO in the designer of that BO, you'll notice a DataSourceKey property. This is set to the key of the DataSource the BO will use to interact with the data. The SecurityBasics.SecurityDataSourceKey is simply used to set this property on the RBS BOs that provide data for the various RBS features.



The security key and vector is a string that is used to generate a key and vector that is used to encrypt the information within the Data column in the user table (SFSUsers). You set this in InitiApp() and it must match what has been set as the security key in the security project (see "Specifying the Encryption Key for User Data" in help) if you want to distribute any user data set at design time.



So, since they are both just strings, they could be the set to the same string, but they are not the same thing and I'd likely not use the same string.



Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Also Charles Thomas Blankenship posted a detail document on how to setup the RBS on a separate database, check out this link: http://forum.strataframe.net/FindPost14216.aspx


Edhy Rijo

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