I can't seem to get the users in a role using the RoleManager.GetUsersInRole method. I have tried both the default provider as well as the AppRoles provider, and no matter what, if there are users in the role, it gives me this error. If there are no users it comes back with an empty list as expected.
System.NullReferenceException: Object reference not set to an instance of an object.
at DynamicModule.ns.Wrapped_OpenAccessRoleProvider_27f3332dd3234177a50e5232730adb47.GetUsersInRole(String roleName, String filterExpression, String sortExpression, Int32 skip, Int32 take)
at Telerik.Sitefinity.Security.RoleManager.GetUsersInRole(String roleName)
Here's my code:
var roleMan = RoleManager.GetManager();
var users = roleMan.GetUsersInRole("Staff");