We have two servers running the same ASP.NET MVC application under IIS. Server A is running IIS 7.5 on Windows Server 2008 R2 Standard v 6.1 build 7601 SP1. Server B is running IIS 8.5 on Windows Server 2012 R2 v 6.3 build 9600.
The app pools run under the same windows user.
The webapp uses ProtectedData.Protect and Unprotect with DataProtectionScope CurrentUser, and stores the encrypted values to separate databases (there is no interaction at all between the two servers)
Server A has been running for over a year and on two or three occasions has been unable to decrypt (with the error Failed to decrypt: Key not valid for use in specified state). We didn't understand the reason for this, and simply re-encrypted the values via the application. Since it was a rare occurrence, we decided we could live with it.
Server B has been running for about 3 weeks and in that time the same issue has occurred five times. We cannot live with this, hence me asking this question.
The Load User Profile settings in IIS advanced settings are true on both servers and have been throughout.
Our initial thought was that something might be changing in the app pool identity's user. But we have ruled this out since both apps are running under the same user and when server B breaks, server A continues to work, even after IISRESET and rebooting.
As far as we're aware the settings on the two servers are the same (to the extent possible, since they are different operating systems and IIS versions)
Can anyone think of a reason this might be happening? Thanks in advance.