Locked out of aspnetdb

sql_server_logo

May 7, 2014 | Posted in SQL Server

Found yourself locked out of aspnetdb and need to reset your password?

Declare @UserName NVarChar(30)
Declare @Password NVarChar(30)
Declare @Application NVarChar(255)
Declare @PasswordSalt NVarChar(128)

set @UserName = ‘SomeUser’
set @Password = ‘SomeP@$$word’
set @Application = ‘/ApplicationName’
Set @PasswordSalt = (SELECT 1 PasswordSalt FROM aspnet_Membership WHERE UserID = ’00000000-0000-0000-0000-000000000000′)

Exec dbo.aspnet_Membership_ResetPassword @Application, @UserName, @Password, 10, 10, @PasswordSalt, -5

Read More →