I have a ASP.NET MVC website using FluentSecurity. As a Azure Website it works just fine. I need to make it a WebRole. I added a WebRole project but the WebRole fails at startup with a generic "The page cannot be displayed because an internal server error has occurred."
I have a DenyAnonymousAccessPolicyViolationHandler
and RequireRolePolicyViolationHandler
implementing IPolicyViolationHandler
and the whole FluentSecurity setup according to http://blog.mariusschulz.com/setting-up-fluentsecurity-to-use-ninject-for-dependency-resolution.
I discovered that when I delete both classes implementing IPolicyViolationHandler
then then WebRole starts just fine. I created a sample project demonstating this issue, you can find it at https://dl.dropboxusercontent.com/u/73642/MvcApplication1.zip.
So how can I get the FluentSecurity work with Azure WebRole including my policy classes?