Controllers are not authenticated when using AOP on them #42

dbelcham opened this Issue Oct 9, 2012 · 0 comments


None yet
1 participant

dbelcham commented Oct 9, 2012

If I create and register controllers using:


And then ignore the policy on some:


And then wrap the LoginController with an aspect using an IoC container that uses DynamicProxy2, FluentSecurity will throw an error saying "Security not configured for Castle.Proxy.LoginControllerProxy"

This happens because the proxy used to do the AOP interception is not of the same type as was marked for .Ignore() in my bootstrapping. Since the proxy class is created in memory at runtime there is no way to configure it using configuration.For() where "xxx" is the in memory proxy class.

The only option I can think of to fix this is something like this:


where the string value "{0}Proxy" does a string.Format inserting the name of the type inserted as T in the For.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment