Re: MySQL Membership Provider login fails
Posted by: sergei z
Date: June 16, 2010 03:25PM

I ran into the same problem, having just started with MySQL. Didn't want to settle for clear passwords and after doing some research it seems to point to .NET 4's change of hashing algorithm from SHA1 to HMACSHA256 (based on this discussion: http://tinyurl.com/2g6fcp8)

This may not show on some machines - mine is clean Vista with VWD 2010 Express, and I didn't run the Connector/NET install, rather just using MySql dlls in the same directory. Maybe the install sets up some ASP.NET config files accordingly somewhere.

Anyway, I didn't have time to investigate further, so I resolved the problem by putting this line in my web.config's system.web section:
<machineKey validationKey="AutoGenerate" validation="SHA1" />

Apparently this forces MySQLMembershipProvider to use SHA1. For some reason adding hashAlgorithmType="SHA1" attribute to membership/providers/add element didn't work -- it just wouldn't get picked up.

Options: ReplyQuote


Subject
Written By
Posted
Re: MySQL Membership Provider login fails
June 16, 2010 03:25PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.