Setting User/Group Permissions Fails

Vote:
 
Error: Failed to save access rights for the page and/or its children. This may be caused by having a user with the same name as a group.
Has anyone experienced this? How would I be able to tell which group or user has the same name if as we have so many groups and users?

The error isn't very specific about which user or group is causing the problem.

#45437
Nov 05, 2010 20:01
Vote:
 

If you can run some code that looks like this you should be able to find it

 var collection = Membership.GetAllUsers();
            string[] roles = System.Web.Security.Roles.GetAllRoles();

            foreach (MembershipUser user in collection)
            {
                foreach (string role in roles)
                {
                    if (role.Equals(user.UserName))
                        return "same username and role name " + role;
                }
                
            }

    

}

#45438
Nov 05, 2010 20:36
Vote:
 

That did not return any roles, the roles collection was empty.

#45466
Nov 08, 2010 15:43
Vote:
 
string[] roles = System.Web.Security.Roles.GetAllRoles();  

 should return all roles defined. Therefor I quess the problem is in your RoleProvider secion of web.config.

#45479
Edited, Nov 08, 2010 19:35
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.