MySqlMembershipProvider and GetPassword

MySqlMembershipProvider and GetPassword

Postby hamsterlegs » Wed 25 May 2011 10:38


I need to retrieve the passwords for my users (as I'm migrating the system).

Originally my web.config was setup like this:

description="MyDirect membership provider" applicationName="/WebProviders" connectionStringName="MySqlConnectionString"
minRequiredPasswordLength="6" requiresQuestionAndAnswer="false" minRequiredNonalphanumericCharacters="0" requiresUniqueEmail="true" />

With this, if I call GetMethod I get NotSupportedException "Specified method is not supported.".

I then tried changing:


But I still get the same exception. I'm using Version=

I can get the hashed password directly from MySql but I do not know how to decrypt this. I do not have a machineKey element specified in my web.config.

Please advise how I can retrieve my passwords.

Posts: 13
Joined: Wed 09 Jul 2008 16:01

Postby Shalex » Mon 30 May 2011 15:37

Here are the results I have received in our environment:
1) [enablePasswordRetrieval="false"] NotSupportedException: Specified method is not supported.
2) [enablePasswordRetrieval="true"] Parser Error Message: Cannot retrieve Hashed passwords.

This is a designed behaviour. MSDN:
If EnablePasswordRetrieval is false, the membership provider will return an exception. If the provider supports passwords with a PasswordFormat of Hashed, you will be unable to retrieve the password for the membership user and should consider making use of the ResetPassword method when a user has forgotten his or her password.
A ConfigurationException will be thrown if enablePasswordRetrieval is set to true and passwordFormat is set to Hashed in the Web.config file for the ASP.NET application.
Devart Team
Posts: 7338
Joined: Thu 14 Aug 2008 12:44

Postby hamsterlegs » Mon 30 May 2011 17:22

Thanks but this doesn't really help in the migration process.

Fortunately, I found which means I can transfer and use the hashed passwords.
Posts: 13
Joined: Wed 09 Jul 2008 16:01

Postby Zero-G. » Sat 11 Jun 2011 06:43


May I ask, from what to what you want to migrate? - Maybe there are system own tools the better way!?

mySQL itself makes things like that for it's own, when upgrading from an older version to a new one

But I think, that reading out the passwords will not be so easy because of security thinking...
Posts: 390
Joined: Sat 09 Dec 2006 12:20

Postby hamsterlegs » Sat 11 Jun 2011 09:12


I was migrating to SQL Azure, there are tools available for this process however I was concerened about the password migration. Fortunately this was not a problem and I could migrate the hashed passwords.


Posts: 13
Joined: Wed 09 Jul 2008 16:01

Return to dotConnect for MySQL