If I use :

MembershipProvider membership = Membership.Providers["AspNetSqlMembershipProvider"];
MembershipUserCollection msc = membership.GetAllUsers(0, 200000, out totalnumber);

I got all userS from asnpnet db. That is ok.

If I use:

MembershipProvider membership = Membership.Providers["i"];
MembershipUserCollection msc = membership.GetAllUsers(0, 200000, out totalnumber);

Again, I get only users from aspnet db.

Claims provider is my default provider.

Question: Why can't I get other users ( from AD) when I call GetAllUsers on claims ("i") provider?


I think you'll need to override a method from your claimsprovider that gets all the users from AD AND from the SQL database

Maybe you could use an active directory membershipprovider?

| improve this answer | |
  • 2
    There is no need for overriding. It was just necessary to add ldap provider to web config and in code write MembershipProvider membership = Membership.Providers["LdapMembershipProvider"]; Even "FindUsersByEmail" work correctly! – trip Jun 21 '11 at 12:42
  • Ok, glad you found it :) – Ruben Herman Jun 21 '11 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.