views:

96

answers:

1

Got the ProviderException : The Role Manager feature has not been enabled. So far so good.

Is there somewhere a method that can be called to check if the Role Manager has been enabled or not?

+1  A: 

I found 2 suggestions elsewhere via Google that suggested a) making sure your db connectionstring (the one that Roles is using) is correct and that the key to it is spelled correctly, and b) that the Enabled flag on RoleManager is set to true. Hope one of those helps. It did for me.

Did you try checking Roles.Enabled? Also, you can check Roles.Providers to see how many providers are available and you can check the Roles.Provider for the default provider. If it is null then there isn't one.

Wade
Thanks for you answer. But it's not what I want. I want a method that check's if the Role Manager feature is enabled or not, without caching the ProviderException for that purpose.
gsharp