+1-888-365-2779
Try Now
More in this section

Forums / Set-up & Installation / Can't access users area of admin

Can't access users area of admin

4 posts, 0 answered
  1. Andrew Wrigley
    Andrew Wrigley avatar
    63 posts
    Registered:
    01 Sep 2009
    28 Jan 2010
    Link to this post
    Hi

    I have an installation of sitefinity ce.  I find I cannot access the users area but get the error below (I have 3 other installations of sitefinity ce that are working fine...)

    Server Error in '/' Application.

    Object reference not set to an instance of an object.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace: 

    [NullReferenceException: Object reference not set to an instance of an object.]   Telerik.DataAccess.AspnetProviders.Role.GetUsers() +104   Telerik.DataAccess.AspnetProviders.TelerikRoleProvider.GetUsersInRole(String roleName) +35   Telerik.Security.UserManager.GetRoles() +116   Telerik.Security.WebControls.RolesDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +18   System.Web.UI.WebControls.Repeater.GetData() +35   System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +220   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +51   System.Web.UI.WebControls.Repeater.DataBind() +75   System.Web.UI.WebControls.Repeater.EnsureDataBound() +55   System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) +15   System.Web.UI.Control.PreRenderRecursiveInternal() +80   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842


    Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082


    Any help appreciated

    Andrew
  2. Andrew Wrigley
    Andrew Wrigley avatar
    63 posts
    Registered:
    01 Sep 2009
    28 Jan 2010
    Link to this post
    These are the membership settings in the web.config:

    <roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="Sitefinity">
          <providers>
            <clear />
            <add connectionStringName="DefaultConnection" applicationName="/"
              name="Sitefinity" type="Telerik.DataAccess.AspnetProviders.TelerikRoleProvider, Telerik.DataAccess" />
          </providers>
        </roleManager>
        <membership defaultProvider="Sitefinity" userIsOnlineTimeWindow="15" hashAlgorithmType="">
          <providers>
            <clear />
            <add name="Sitefinity" connectionStringName="DefaultConnection" type="Telerik.DataAccess.AspnetProviders.TelerikMembershipProvider, Telerik.DataAccess" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" />
          </providers>
        </membership>
        <profile defaultProvider="Sitefinity">
          <providers>
            <clear />
            <add name="Sitefinity" connectionStringName="DefaultConnection" applicationName="/" type="Telerik.DataAccess.AspnetProviders.TelerikProfileProvider, Telerik.DataAccess" />
          </providers>

    Ie, I am using the defaults...

    Andrew
          <properties>
            <add name="FirstName" />
            <add name="LastName" />
            <add name="Position" />
            <add name="Photo_Hidden" />
            <add name="Photo" defaultValue="~/Sitefinity/Common/Images/defaultavatar.gif" />
            <group name="InstantMessenger">
              <add name="IM_Type" />
              <add name="IM_Value" />
            </group>
            <group name="Phone">
              <add name="Value" />
              <add name="Type" />
            </group>
          </properties>
        </profile>

    Ie, no different to the defaults.  I can access the 
  3. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    28 Jan 2010
    Link to this post
    Hello Andrew Wrigley,

    Thank you for using our services.

    The web.config file seems fine. I am having doubts that something might have happened to the DB and particularly  to the tables containing the roles data and the users in roles data. As the exception is thrown from code trying to get the roles for a user. Could you go to your Sitefinity database and take a look at the telerik_Roles and telerik_UsersInRoles tables. The users in roles tables contains RoleID, this role id must also exist in the Roles table.

    Could you take a look there and get back to us with the results.

    Best wishes,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  4. Andrew Wrigley
    Andrew Wrigley avatar
    63 posts
    Registered:
    01 Sep 2009
    28 Jan 2010
    Link to this post
    Thanks

    I have sorted things out by deleting a telerik_UserInRoles pairing that related to a user that was deleted, but for some reason was not deleted in the telerik_UserInRoles table.  It may be that someone deleted the data manually when looking at sitefinity's membership tables.

    I note, for other people looking at this thread, that you can still use the Visual Studio Website Administration Tool to add users and roles.  As you would expect given the provider model of the membership functionality.

    Many thanks, problem solved.

    Andrew
Register for webinar
4 posts, 0 answered