Search code examples
asp.nethashmembership

How to check the current Hash algorithm of ASP membership service?


By default, ASP.NET 4 uses the HMACSHA256 algorithm for hash operations on cookies and view state. It there any simple way to check the current Hash algorithm of ASP membership service?


Solution

  • There are two places (that I know of) to look --

    Check your web.config -- you can set the hash for your membership services there which would override the machine settings.

    <membership hashAlgorithmType="SHA1">...</membership>
    

    if this doesn't apply to you, then you can check the machineKey in IIS.

    http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-aspnet-configuration-management#TOC301270285