0

My code is fairly simple.

   var member = Membership.GetAllUsers();

It throws "NotSupportedExpcetion" when this line is executed. I am trying to retrieve a list of users and populate on the web ui. Thank you.

DaveRandom
  • 87,921
  • 11
  • 154
  • 174
Kok Leong Fong
  • 241
  • 1
  • 2
  • 5

2 Answers2

1

You might be using the default SimpleMembership provider in MVC4? It does not support GetAllUsers() among many other things. My solution has often been to roll my own.

angularsen
  • 8,160
  • 1
  • 69
  • 83
0

try this

public ActionResult GetUser()
    {

    UsersContext oModel = new UsersContext();

    return View(oModel.UserProfiles.ToList());

    }

get all users which were registered using simpleMemberShipProvider [ mvc 4]

nKn
  • 13,691
  • 9
  • 45
  • 62