dynamic tools for .net developers™  LaMarvin Home
home » constable » faq » context

Why CAZE always denies executing actions


You've set up your authorization policy correctly, but calling IsActionExecutable always returns false and the GetExecutableActionRules always returns empty collection and calling ExecuteAction always throws the PermissionDeniedException.

Cause and remedy

You've probably forgot to associate the policy with a valid authorization context. Please make sure that you've set the CurrentPrincipal property to a feasible IPrincipal reference and that the IPrincipal implementation is actually member of some roles defined in the authorization policy.

If you're using states (i.e. your policy defines more than one state), please check also that the CurrentState is not null (Nothing in Visual Basic).

© 2002-2007 LaMarvin. All Rights Reserved.     [Terms of use]     [Privacy] This site doesn't open new browser windows.