MembershipService.ChangePassword
不更改密码问题。我不知道为什么...
var userUsers = from n in db.aspnet_Users where n.UserId == id select n;
string userName = userUsers.Single<aspnet_Users>().UserName;
MembershipUser user = Membership.GetUser(userName, false);
if (user != null)
{
string generatedPassword = user.ResetPassword();
if (MembershipService.ChangePassword(userName, generatedPassword, model.NewPassword))
{
// So it doesn't change the password