Security Editor Error


Author
Message
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: 7K
Make sure that you do not have any old DLLs that are being referenced.  Clean your solution and do a rebuild to make sure.
Kevin Lingofelter
Kevin Lingofelter
StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)
Group: Forum Members
Posts: 77, Visits: 804
Hmm..it seems as though things got worse. Now when I uncomment the line that sets the default action, the main form won't display at all.
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Kevin,

We ran into the exact same problem, probably about the same time you did Smile

Yes, when the bound controls are refreshed, the permission action was defaulted to whatever the permission action was, rather than to Grant... and the security is only checked when there is a security key assigned to the field on the business object, so when the security wasn't checked and it was initialized to the default (Deny) rather than to Grant, it failed when trying to block the control. 

Needless to say, it's in the build that I'm building right now Smile

Kevin Lingofelter
Kevin Lingofelter
StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)
Group: Forum Members
Posts: 77, Visits: 804
I've been able to reproduce the problem. My InitApplication code looks like this:

private static void InitApplication(InitializingApplicationEventArgs e)

{

//-- Add the main form type
//-- If more than one form is added to the collection, they can be chosen by showing a "Gateway" form
// and supplying the index of the form to show (At least 1 form type must be added to the collection

e.Forms.Add(typeof(WinForm.frmMain));

// Initialize the localization stuff
Localization.MessageKeyType = MessageKeyDataType.SqlServer;
Localization.MessageLocaleID = Localization.GetActiveLanguage("WinForm", "", false);

//Initialize the Security management feature
SessionLock.StartSessionMonitoring();
SessionLock.SessionLockKey = Keys.F12;
SecurityBasics.SetSecurityKeyAndVectorForUserAuthentication("MyKey");
SecurityBasics.DefaultPermissionAction = PermissionAction.Deny;

}

The problem is in setting the DefaultPermissionAction. If I comment out that line, the editor displays fine, but if I keep it as is, the error will come up.

Is there another place I should be putting this?


Kevin Lingofelter
Kevin Lingofelter
StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)
Group: Forum Members
Posts: 77, Visits: 804
Not sure what I did, this is working again. I imagine the critter is still lurking in the background, but for now, at least, I can view the editor.
Kevin Lingofelter
Kevin Lingofelter
StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)
Group: Forum Members
Posts: 77, Visits: 804
Geeze, I think I'm losing it here...Crazy

I cannot access the security editor any longer from my application. I am getting the following error:

BusinessLayerException
 An error occurred while refreshing the data from field 'SFSPreferencesBO.sp_PwMaxLength' to property 'Value' on control 'nudMaxLength.'
TargetInvocationException
 Exception has been thrown by the target of an invocation.
ArgumentOutOfRangeException
 Value of '0' is not valid for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'.
Parameter name: Value

(trace snipped)

The wierd thing is I can access the permissions project just fine from the "Role Based Security" editor in VS.

Is there a setting that is corrupt somewhere?

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