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
{
e.Forms.Add(
}
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?
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?