More in this section
Forums / Security / Cant assign users to a role

Cant assign users to a role

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Abhijit
    Abhijit avatar
    5 posts
    10 Jun 2010
    02 Jul 2010
    Link to this post

    In the Administration Panel under Users, when I add a User from the Active Directory; I get the message "User 'username' has been assigned to 'rolename'" but when I look at the roles the users are not in them. I had been trying to resolve this for a while now but to no avail, please help.

    I am using the CustomRoleProvider.

    Attached is my web.config

        <add name="IDTADService" connectionString="LDAP://mydomain" />
        <add name="Sitefinity" connectionString="data source=ISW-ACHATTERJEE\SQLEXPRESS;Integrated Security=SSPI;initial catalog=IDT_CMS" providerName="System.Data.SqlClient" />
                <add assembly="System.Core, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                <add assembly="System.Xml.Linq, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Data.DataSetExtensions, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.DirectoryServices, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="Sitefinity">
                <clear />
                <add connectionStringName="DefaultConnection" 
                type="Telerik.DataAccess.AspnetProviders.TelerikRoleProvider, Telerik.DataAccess" />
        <membership defaultProvider="Sitefinity">
                <clear />
                <add connectionStringName="IDTADService" 
                type="Telerik.Security.ActiveDirectory.TelerikADMembershipProvider, Telerik.Security" />
        <profile defaultProvider="Sitefinity">
                <clear />
                <add name="Sitefinity" connectionStringName="DefaultConnection" applicationName="/" type="Telerik.DataAccess.AspnetProviders.TelerikProfileProvider, Telerik.DataAccess" />
                <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 name="Phone">
                    <add name="Value" />
                    <add name="Type" />
        <security defaultProvider="DefaultSecurityProvider" cmsProvidersName="Sitefinity">
                <clear />
                <add name="Administrators" permission="Unrestricted" />
                <add name="achatterjee" permission="Unrestricted" />
                <clear />
                <add name="DefaultSecurityProvider" connectionStringName="DefaultConnection" type="Telerik.Security.Data.DefaultSecurityProvider, Telerik.Security.Data" membershipProvider="Sitefinity" roleProvider="Sitefinity" />
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    04 Jul 2010
    Link to this post
    Hello Abhijit,

    Membership and Role providers are related. Out of the box our providers do not implement logic for maintaining roles and users from AD. By default Sitefinity is just an acceptor of AD users and roles. I believe that the problem is somewhere in the code of your role provider and AddUsersToRoles method which you have to use to adding a user to a role.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about 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