GetUsersInRole error
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)
Hello Matt,
Thank you for using our services. Can you, please, make sure you've spelled correctly the RoleName when passing it as an argument to the method? I have just tried this functionality and everything seems to work as expected (please take a look at the attached sample video).
Best wishes,
Boyan Barnev
the Telerik team
Boyan,
I have the same issue. It only occurs when you are logged out of the Sitefinity Admin.
Also - make sure that one of the users in "Custom Role", is also part of the "Administrators" role. So the user belongs to both "Administrators" and "Custom Role"
Thanks,
Chris