Reputation: 241
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.
Upvotes: 0
Views: 626
Reputation: 1
try this
public ActionResult GetUser()
{
UsersContext oModel = new UsersContext();
return View(oModel.UserProfiles.ToList());
}
get all users which were registered using simpleMemberShipProvider [ mvc 4]
Upvotes: 0
Reputation: 8678
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.
Upvotes: 1