解决方法
如果要直接通过数据库更改密码,您将需要创建一个新用户或查找您已知道密码的现有用户.然后,您需要获取密码和盐,然后使用相同的密码和盐更新相关用户.
SELECT au.username,aa.ApplicationName,password,passwordformat,passwordsalt FROM aspnet_membership am INNER JOIN aspnet_users au ON (au.userid = am.userid) INNER JOIN aspnet_applications aa ON (au.applicationId = aa.applicationid) WHERE au.UserName = '[user to change password]'
更改密码:
DECLARE @changeDate DATETIME SET @changeDate = GETDATE() EXEC aspnet_Membership_setPassword 'applicationName','user','password','passwordsalt',@changeDate,Passwordformat
取自here …