Answered by:
The resource identifier failed to decrypt

Question
-
User353133278 posted
Hello All,
We are hosting a site that has sitefinity, the site is crashing frequently and getting the error given below:
============================
Event code: 3012
Event message: An error occurred processing a web or script resource request. The resource identifier failed to decrypt.
Event time: 8/4/2016 1:09:19 PM
Event time (UTC): 8/4/2016 6:09:19 PM
Event ID: 9ed7856e9baa479f944599104bda8f46
Event sequence: 1265
Event occurrence: 6
Event detail code: 0
Exception information:
Exception type: HttpException
Exception message: Unable to validate data.
at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo, Boolean useLegacyMode, IVType ivType, Boolean signData)
at System.Web.UI.Page.DecryptString(String s, Purpose purpose)
at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
Stack trace: at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo, Boolean useLegacyMode, IVType ivType, Boolean signData)
at System.Web.UI.Page.DecryptString(String s, Purpose purpose)
at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)+++++++++++++++++
I have already implemented the steps given in the URL:
http://www.sitefinity.com/developer-network/forums/general-discussions-/event-code-3012
Please advice.
Regards,
Thursday, August 4, 2016 6:23 PM
Answers
-
User-663891294 posted
Basically it because it's set to autogenerate (if that's still the case), if the application pool recycles. I'd go as far as believing if the AppDomain restarts unexpectedly, the machine key will be autogenerated once again. That means that anything previously encrypted with the old key will fail to decrypt with the new key. Definitely recommend to follow Jean's steps even if it is one server. However, if you experience this issue very frequently, I'd also recommend to investigate if the application or the app domain are recycling/restarting more than the expected frequency as this may lead to other errors in the future.- Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
Tuesday, August 16, 2016 12:29 PM
All replies
-
User1278090636 posted
Hi,
Please take a look at the following link.
Best Regards,
Jean
Friday, August 5, 2016 2:34 AM -
User353133278 posted
Hello Jean,
Thx, for responding quickly!
The link that you have specified in your post, is not meant for server 2012 R2.
(https://www.microsoft.com/en-us/download/details.aspx?id=21166)
We are hosting the site on the server 2013R2 with IIS 8.5
Warm Regards
Friday, August 5, 2016 9:22 AM -
User1278090636 posted
Hi,
Please try generate a static machine key instead of setting the meachine key to AutoGenerate.
1. Go to IIS on your server and go to Machine Keys:
2. Remove the check-box from both “Automatically Generate at runtime” options and then click Generate Keys.
3. Hit apply and copy both keys to notepad.
4. Go to IIS on your second server and paste the keys generated on the first server to the machine keys respectively.
5. Hit apply and do an IISRESET on both servers
Best Regards,
Jean
Tuesday, August 9, 2016 6:35 AM -
User353133278 posted
Hello Jean,
Thanks you for being so elaborately with the steps.
I am just using 1 server, can I go ahead and apply the steps the you have mentioned!
Awaiting your response.
Warm Regards,
Tuesday, August 16, 2016 10:31 AM -
User-663891294 posted
Basically it because it's set to autogenerate (if that's still the case), if the application pool recycles. I'd go as far as believing if the AppDomain restarts unexpectedly, the machine key will be autogenerated once again. That means that anything previously encrypted with the old key will fail to decrypt with the new key. Definitely recommend to follow Jean's steps even if it is one server. However, if you experience this issue very frequently, I'd also recommend to investigate if the application or the app domain are recycling/restarting more than the expected frequency as this may lead to other errors in the future.- Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
Tuesday, August 16, 2016 12:29 PM