StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Security Editor ErrorExpand / Collapse
Author
Message
Posted 10/09/2006 12:02:22 PM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 08/23/2007 2:01:12 AM
Posts: 77, Visits: 804
Geeze, I think I'm losing it here...

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?

Post #3401
Posted 10/09/2006 1:26:38 PM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 08/23/2007 2:01:12 AM
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.
Post #3411
Posted 10/09/2006 2:58:02 PM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 08/23/2007 2:01:12 AM
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?

Post #3417
Posted 10/09/2006 4:42:31 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 12/09/2008 3:36:08 PM
Posts: 2,686, Visits: 1,891
Kevin,

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

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


www.bungie.net
Post #3419
Posted 10/09/2006 7:47:31 PM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 08/23/2007 2:01:12 AM
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.
Post #3422
Posted 10/09/2006 9:32:06 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 6:26:12 PM
Posts: 4,901, Visits: 4,887
Make sure that you do not have any old DLLs that are being referenced.  Clean your solution and do a rebuild to make sure.
Post #3430
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 7:18pm

Powered by InstantForum.NET v4.1.4 © 2009
Execution: 0.125. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.