Search code examples
asp.netasp.net-membershipmembership-provider

ASP.NET Membership: "Attribute not recognized 'hashAlgorithmType'" (SHA256)


I want to use SHA256 as the hashalgorithmtype in my Membership Provider instead of the default SHA1.

<membership defaultProvider="AspNetSqlMembershipProvider" hashAlgorithmType="SHA256">
<providers>
   passwordFormat="Hashed"
   hashAlgorithmType="SHA256"/>
</providers>

This gives me the following error when I want to save to the Membership table: "Attribute not recognized 'hashAlgorithmType'"

Is there any way to solve this? Can't seem to find anything on the net...


Solution

  • I think it should look like this:

    <membership defaultProvider="AspNetSqlMembershipProvider" hashAlgorithmType="yourAlgorithmType">
    <providers>
       <!-- optional provider information here. just leave empty if you wish -->
    </providers>