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