I am getting the following error with my IAuthorizationProvider:
Activation error occured while trying to get instance of type IAuthorizationProvider, key "DefaultRules"
This link was a similar issue about Logging App Block:
Here they said it might have something to do with it being a class library. Is that the problem. It said to use a FileConfigurationSource, but I can't see how to use that for the AuthorizationFactory. Can someone please help me with an example?
This is my code:
private IAuthorizationProvider rules = AuthorizationFactory.GetAuthorizationProvider("DefaultRules");
and my security config section:
<add type="Microsoft.Practices.EnterpriseLibrary.Security.AuthorizationRuleProvider, Microsoft.Practices.EnterpriseLibrary.Security, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
<add expression="R:Administrators AND NOT I:?" name="EditRule" />