access method AddObjectAuthorizationRules() failed

access method AddObjectAuthorizationRules() failed

Old forum URL: forums.lhotka.net/forums/t/10068.aspx


ddredstar posted on Sunday, February 13, 2011

Guys,Please help me to check out the error bellow:

Attempt by method 'Csla.Rules.AuthorizationRuleManager.InitializePerTypeRules(Csla.Rules.AuthorizationRuleManager, System.Type)' to access method AddObjectAuthorizationRules() failed

 this error occur in method

private static void InitializePerTypeRules(AuthorizationRuleManager mgr, Type type) { if (!mgr.InitializedPerType) lock (mgr) if (!mgr.InitializedPerType) { mgr.InitializedPerType = true; // invoke method to add auth roles var flags = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy; System.Reflection.MethodInfo method = type.GetMethod("AddObjectAuthorizationRules", flags); if (method != null) method.Invoke(null, null); } }

Thanks in advance!!!

Copyright (c) Marimer LLC