Trouble Setting Up Security


Author
Message
rmoore
rmoore
StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)
Group: Forum Members
Posts: 21, Visits: 84
I'm having some trouble setting up security. I've been through the documentation and examples a couple times and believe I have everything setup correctly. The problem I'm having is that the app in not authenticating the user. I'm not getting any exception, only a message form saying "the given credentials could not be authenticated...". I've double checked the settings in the security editor everything looks fine. Could there be anything else that I've been overlooking, or something that is commonly overlooked?
Trent Taylor
Trent Taylor
StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Without looking at your code it is hard for me to give you any type of exact answer, but some common errors include forgetting to set the security key and vector to the same in the AppMain.vb (or program.cs) (look in the InitApplication() method) and the security editor.  These values must match:

SecurityBasics.SetSecurityKeyAndVectorForUserAuthentication("MyKey")

Next, have you made sure that your data source has either the security tables or that you have set the security data source key to point to the proper database if they are not housed within your default database?  This code will also be in the AppMain.vb or program.cs file.  If you have deployed the security tables through the DDT to same database your applicaiton is using for everything else, then you do not need to do anything here.  However, if you are storing the SFSxxx tables in a different database than your default, you must setup that data source as well and then set the SecurityDataSourceKey property:

SecurityBasics.SecurityDataSourceKey = "MyDataSourceKey"

Last, be sure to run and look at how the Role-Based Security sample is setup.  This sample comes with the framework and you have the source code in both VB.NET and C#.  Let us know if none of these options work for you and we will go from there. Smile

rmoore
rmoore
StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)
Group: Forum Members
Posts: 21, Visits: 84
As far as I can tell, everything is set up properly. But it still doesn't work. I can get the login form to show but when the credentials are entered, authentication fails. I have one user, John Doe with a simple password jd. I've created a user role and assigned the user this role. I've also assigned the user grant permission for the MDIMainForm. Here are my Solution Preferences and Security Properties. I've attached a copy of my AppMain.vb.















StrataFrame Team
S
StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Well, if you've called the
SecurityBasics.SetSecurityKeyAndVectorForUserAuthentication("CMPR.SecurityKey")

command within the InitApplication() of your AppMain.vb (or Program.cs), then the only other thing that could be wrong is that your users are not deployed to the SFS tables that are referenced at runtime.

Are the SFS tables part of your database?  Are the users and permissions deployed from the StrataFrame database (used by design-time) to those tables?

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