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



Getting an error when assignign permission to...Expand / Collapse
Author
Message
Posted 10/13/2006 2:22:41 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Today @ 10:24:35 AM
Posts: 809, Visits: 11,678
Hya.

This is what I'm getting when I choose the Restriction from the dropdown control:

NullReferenceException
 Object reference not set to an instance of an object.

Source     : MicroFour StrataFrame Security

Stack Trace:
   at MicroFour.StrataFrame.Security.UserEditor.SaveData(TreeNode Node, SetDataPiece SetPiece)
   at MicroFour.StrataFrame.Security.UserEditor.cboRestriction_SelectedValueChanged(Object sender, EventArgs e)
   at System.Windows.Forms.ListControl.OnSelectedValueChanged(EventArgs e)
   at System.Windows.Forms.ComboBox.OnSelectedValueChanged(EventArgs e)
   at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
   at System.Windows.Forms.ComboBox.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Anything I should look at?

Post #3582
Posted 10/13/2006 4:09:04 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 1:09:23 PM
Posts: 2,686, Visits: 1,888
I can't make it fail on this end, Ivan.

Is there any other information you can give me?  Is this a new user, or one you're editing?  Are you adding the restriction set to a category, the top node, or an individual permission, etc...


www.bungie.net
Post #3590
Posted 10/13/2006 4:38:15 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Today @ 10:24:35 AM
Posts: 809, Visits: 11,678
Hi Ben.

Didn't do anything special ... created the user, then a role, then created a restriction. Went back to the user, edited him, permission tab, restriction dropdown, chose the one just created, and "boom".

Post #3595
Posted 10/13/2006 4:41:23 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 1:09:23 PM
Posts: 2,686, Visits: 1,888
I'll see what I can do to replicate it.  Thanks, Ivan.


www.bungie.net
Post #3596
Posted 10/16/2006 4:17:12 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Today @ 10:24:35 AM
Posts: 809, Visits: 11,678
Hi Ben.

Do you think there is something I could try here?

Post #3652
Posted 10/16/2006 8:56:52 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Today @ 10:24:35 AM
Posts: 809, Visits: 11,678
Hi Ben.
 
I just realized something ...regarding the error above, I just noticed I don't have the Permission buttons in the Security Toolbar! Nor the Permission options in the ContextMenu...
Post #3655
Posted 10/17/2006 8:54:59 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 1:09:23 PM
Posts: 2,686, Visits: 1,888
The reason you don't have the permission buttons is that you are opening the SecurityDialog at runtime... and end-users are not allowed to modify permissions at runtime because that's developer-only territory.  However, if you are opening the security editor from the Visual Studio menu, and you do not see the permission menu options listed, then this is a problem


www.bungie.net
Post #3657
Posted 10/17/2006 9:57:40 AM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Today @ 10:24:35 AM
Posts: 809, Visits: 11,678
Sorry ...

So that's the reason for the issue ... if someone extremely clever like me tries to assign a Permission without having inserted one first, the Exception is thrown. Thanks for not showing a "You moron, create a permission first" message.

So, I need to run the security from the Visual Studio, create everything and then use the DDT to import this tables and deploy to the app, is that it?

Thanks Ben, you guys will go straight to heaven.

Post #3658
Posted 10/17/2006 10:28:28 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 1:09:23 PM
Posts: 2,686, Visits: 1,888
Yes, you create the permissions through the editor at design-time and then you can assign them to users at runtime after you deploy the data with the DDT (or scripts, or whatever).


www.bungie.net
Post #3659
« Prev Topic | Next Topic »


Reading This Topic