More in this section

Forums / General Discussions / Value cannot be null - GetUsersInRole

Value cannot be null - GetUsersInRole

2 posts, 0 answered
  1. Raihan
    Raihan avatar
    17 posts
    25 Mar 2011
    08 May 2011
    Link to this post

    The following code throws a Value cannot be null. Parameter name: role exception for the following line of code:

    List<Telerik.Sitefinity.Security.Model.User> editors = roleManager.GetUsersInRole("Editors").ToList();

    What am I doing wrong?

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    11 May 2011
    Link to this post
    Hi Raihan,

    Most probably the instance of the provider which you used to create the rolemanager is not correct. Please check this post.

    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered