Solved

asp.net membership question - Hashed passwords cannot be decoded.

Posted on 2011-02-11
1
2,864 Views
1 Endorsement
Last Modified: 2012-05-11
I'm trying to retrieve user passwords for an admin page.  Apparently I've been using hashed passwords.  I'm developing a low security, friendly site, so I don't give a rip about how secure it is.  I read that I need to change my password format.  I tried this by adding passwordFormat="true" in my web.config, but I still get the 'Hashed passwords cannot be decoded.' error on this line:
Line 180:        MembershipUtil.Password = Membership.Provider.GetPassword(MembershipUtil.Username, String.Empty);

Please advise.  Thanks -
1
Comment
Question by:JT_SIRO
1 Comment
 
LVL 14

Accepted Solution

by:
quizwedge earned 250 total points
ID: 34875770
Your existing users have hashed passwords, so you can't decode them. I found the following response at https://jcbauza.com/forums/p/1076/1270.aspx (though their SSL certificate has expired, so you'll probably get an error)

After a while we discovered what the problem was. The users were created originally by the application using a hashed password. This became an issue as a user with a hash password cannot be migrated automatically to the new encryption setting. So, even though your application is using encryption for the passwords, previously created users will face the issues mentioned before. What we ended up doing was deleting the existing users and creating new ones with the new settings on Web.Config. You could also reset the users and modify a column in the database if deleting them is not an option.
2

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question