Memberhip.GetAllUsers () will not work with SimpleMembership . If the SimpleMembershipProvider class was initialized by calling WebSecurity.InitializeDatabaseConnection () , this method is not supported and will throw a NotSupportedException . You can see it on the Page page .
An alternative way to get all users in SimpleMemberShip is
dynamic users;
using (var db = WebMatrix.Data.Database.Open("UserDb"))
{
users = db.Query("SELECT * FROM Users");
}
here UserDb is the name of my demo version of ConnectionString. This code can be seen in Page .
source
share