I’ve inherited a site that uses an ActiveDirectoryMembershipProvider for authentication and a SqlRoleProvider for authorization. The authentication is going against our company’s LDAP server, so there’s a couple hundred users. However, the site I’m creating will only use about 60 or 70 of those users.
Is there a way to easily get just the users of my site (ie the Users with Roles in my SqlRoleProvider)? Or do I have to get all (couple hundred) Users, then loop through and see if their Roles match any of the Roles in my site?
I’ve inherited a site that uses an ActiveDirectoryMembershipProvider for authentication and a SqlRoleProvider for
Share
If anybody is curious,
I ended up using a nested
foreach; looping through all the roles in my site, then looping throughRoles.GetUsersInRole(role)and adding the user to a List<> (after first checking to make sure they weren’t already in it).