IIS - Machine Key, registry keys between servers are not consistent

Posted on 2014-08-05
Last Modified: 2014-08-23
Hi everyone,
We have two front-end servers that are load balanced.  Server 2008 R2.  IIS is serving a couple web apps, specifically web forms.  We've been experiencing viewstate errors during onSubmit so we configured a static Machine Key for each web app in the IIS gui and web.config's, consistently across both servers.  We're still facing viewstate problems so we took a closer look at the registry keys.

We found a discrepancy on one of the servers in production.  Our development environment is configured alike and does not contain the discrepancy.  

server1 contains a few keys that server2 doesn't.  We're not positive this is an issue but these servers should be consistent.  

Our question is, how can we learn more about these keys?  This is prod so we don't want to delete them without more research.  Highlighted below is the discrepancy between servers.

Screenshots capture HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET

Production Server1:
Production Server2:
Development Server1:
Development Server2:

Thanks in advance for your help!
Question by:bmsande
    LVL 77

    Expert Comment

    by:David Johnson, CD, MVP
    Best way is to add a machineKey element into each of the web server's web.config and define the same keys and algorithm. The machineKey goes under the System.web node.
    i.e. in your web.config
    <machineKey validation="SHA1" validationKey="A1B2C3D4E5F6F6E5D4C3B2A1A1B2C3D4E5F6F6E5D4C3B2A1A1B2C3D4 E5F6F6E5D4C3B2A1A1B2C3D4E5F6F6E5D4C3B2A1A1B2C3D4E5F6F6E5D4C3B2A1B2C3D4E5"
    decryption="Auto" decryptionKey="A1B2C3D4E5F6F6E5D4C3B2A1A1B2C3D4E5F6F6E5D4C3B2A1" /> 

    Open in new window

    Author Comment

    That was done already.  Web.config sections match with a static machine key.  But we're trying to understand these registry keys... and trying to correct the inconsistency highlighted above.

    Accepted Solution

    Does anyone know how to identify where these registry keys come from?  We have several web servers that we keep consistent, but this server in particular has some registry keys that are not expected.  We'd like to remove this keys but need to learn more about them before we proceed.
    LVL 77

    Expert Comment

    by:David Johnson, CD, MVP
    they were probably generated before you added the machine keys into the web.config

    Author Closing Comment


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    More or less everybody in the IT market understands the basics of Networking, however when we start talking about Storage Networks, things get a bit dizzier, and this is where I would like to help.
    Hyper-convergence systems have taken the IT world by storm and have quickly started to change our point of view of how the data center should and could be architected. In this article, I’ll explain the benefits of employing a hyper-converged system …
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    This video discusses moving either the default database or any database to a new volume.

    730 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now