.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links


Posted By:      Posted Date: August 26, 2010    Points: 0   Category :ASP.Net

I have been working hard on adding to my Web Admin pages, one thing many of the users have requested is the ability to reset user passwords.

I did alot of research and thought I found what I needed, but I must be missing something.

I thought the passwordsalt was a randomly generated key to add to the password before hashing it.

Then when the user entered there password into the log in, it pulled the password salt from the database, added it to the password they typed in, hashed them and compared it to the password in the database.

With that in mind this is what I came up with

Dim salt As Byte() = New Byte(32) {}


Dim NewPasswordBytes As Byte() = System.Text.UnicodeEncoding.Unicode.GetBytes(txtNewPassword.Text)

Dim combinedBytes As <

View Complete Post

More Related Resource Links

Invalid column name 'PasswordSalt' - When session dies?

Server Error in '/' Application. Invalid column name 'PasswordSalt'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Invalid column name 'PasswordSalt'. Source Error: Line 12: login_password = Request.Form["login_password"]; Line 13: var login_username = Request.Form["login_username"]; Line 14: if(WebSecurity.Login(login_username, login_password)){ Line 15: Response.Redirect("~/"); Line 16: } Source File: c:\login.cshtml Line: 14 Stack Trace: [InvalidOperationException: Invalid column name 'PasswordSalt'.] Microsoft.Data.DynamicRecord.VerifyColumn(String name) +146 Microsoft.Data.DynamicRecord.get_Item(String name) +18 Microsoft.Data.DynamicRecord.TryGetMember(GetMemberBinder binder, Object& result) +11 CallSite.Target(Closure , CallSite , Object ) +130 System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +438 Microsoft.WebPages.SimpleMembershipProvider.GetPassword(Database db, Int32 userId, String& passwordSalt) +641 Microsoft.WebPages.SimpleMembershipProvider.CheckPassword(Database db, Int32 userId, String password
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend