AddObjectAuthorizationRules fails after Upgrade from 8 to 9 #4609
Unanswered
johntcohoon
asked this question in
Questions
Replies: 2 comments
-
Oh damn... PEBKAC. One of my projects was not getting upgraded for Csla through NUGET to v9. It showed that it was, but was still including v8 dlls. Anyway, I removed the package reference and readded it. All good now. :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I upgraded from v8 to v9 and now all my authorization rules are failing.
System.MissingMethodException: Method not found: 'Void Csla.Rules.BusinessRules.AddRule(System.Type, Csla.Rules.IAuthorizationRule)'.
at ItemListing.AddObjectAuthorizationRules()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Here is the code that worked in V8:
[ObjectAuthorizationRules] public static void AddObjectAuthorizationRules() { Csla.Rules.BusinessRules.AddRule(typeof(ItemListing), new Csla.Rules.CommonRules.IsInRole(Csla.Rules.AuthorizationActions.GetObject, "UserRole", "AdminAdmin")); }
If I comment-out the line of code and hit the breakpoint within the method, and then manually QuickWatch that line of code, then it works, but it fails without even entering the method with the like of code in place.
Beta Was this translation helpful? Give feedback.
All reactions