Reset Password from asp.net membership aspnet_users

first get User Name, application Name, PasswordFormat and Salt from apsnet database.

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 = ‘jignesh.patel’

Use following script to reset password.

DECLARE @changeDate DATETIME
SET @changeDate = GETDATE()

EXEC aspnet_Membership_setPassword
‘applicationname’,
‘jignesh.patel’,
‘[password]’,
‘[passwordsalt]’,
@changeDate,
Passwordformat

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s