I'm getting errors on my website when trying to retrieve content via the WebResource.axd provider. I'm running Windows Server 2008 on two machines that are network load balanced. Both sites web.config are identical (mirrored via robocopy) and contain a <machineKey
/> directive. The error occurs when a page served by machine 1 requests a script from machine 2. The machine 2 event log reports
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 2.0.50727.0" />
<EventID Qualifiers="32768">1309</EventID>
<Level>3</Level>
<Task>3</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2010-11-24T11:08:25.000Z" />
<EventRecordID>13144</EventRecordID>
<Channel>Application</Channel>
<Computer>02.mywebsite.com</Computer>
<Security />
</System>
<EventData>
<Data>3005</Data>
<Data>An unhandled exception has occurred.</Data>
<Data>24/11/2010 11:08:25</Data>
<Data>24/11/2010 11:08:25</Data>
<Data>258925b210164fccb0cba5ba5ee9d575</Data>
<Data>44359</Data>
<Data>1633</Data>
<Data>0</Data>
<Data>/LM/W3SVC/1/ROOT-3-129350691546618622</Data>
<Data>Full</Data>
<Data>/</Data>
<Data>E:\CMSLive\</Data>
<Data>02</Data>
<Data>
</Data>
<Data>48164</Data>
<Data>w3wp.exe</Data>
<Data>NT AUTHORITY\NETWORK SERVICE</Data>
<Data>CryptographicException</Data>
<Data>Length of the data to decrypt is invalid.</Data>
<Data>http://mywebsite.com/WebResource.axd?d=_on9biI-K6SuQqcJS7_8niVQDrkwoqhB5clsFCL-BWsnsvfIdwtsTVKoYl1o5daqtwo1b1vuD-QshhMpXgT-fsB7u7_rw50OMm3CTeouHDFaG4NcWyzPv-5fYUC-EvpOVVLtZIqgiyL_EZYqbgc2NYgLSoA1&t=634251602713396228&build=602798</Data>
<Data>/WebResource.axd</Data>
<Data>xxx.xxx.xxx.xxx</Data>
<Data>
</Data>
<Data>False</Data>
<Data>
</Data>
<Data>NT AUTHORITY\NETWORK SERVICE</Data>
<Data>14814</Data>
<Data>NT AUTHORITY\NETWORK SERVICE</Data>
<Data>False</Data>
<Data> at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, IVType ivType, Boolean useValidationSymAlgo)
at System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType)
at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
</Data>
</EventData>
</Event>
We're getting *many* of these event reports every minute since the site is quite active. The problem manifests to the user as the complete failure of JS on the site (One of the WebResource calls loads jQuery, without which everything breaks)
I'm unable to figure out exactly what, at this point, is causing the error - though I do know this security fix was installed as part of the server build for these boxes. But since similar errors are being reported on this site I figured I 'd throw mine
in. The quick fix is to put session affinity on our LB but that comes with it's own issues at the moment which we'd rather avoid.
We're having the same issue here. I've got two servers with the same machine key and after installing the patch on both servers, they're generating different (and incompatible) urls for the same resources (via both WebResource.axd and ScriptResource.axd).
The machine.config has this on both servers:
Does your <machineKey> section also have a validation key for both machines? You're required to specify
both an encryption and a signing key if you deploy across a farm. See
http://msdn.microsoft.com/en-us/library/w8h3skw9.aspx for more information.
Generally we recommend that the validation key algorithm be HMACSHA256, so the validation key itself would be 64 hexadecimal characters, randomly generated just like the encryption / decryption key. Note: You
must not use the same key for decryption as you do for verification.
No, it doesn't. These machines are not actually part of a farm, I just need to make sure the encrypted string never changes (don't ask - it's a bad design and not mine). I guess the validation key was not used in generating these URLs before the patch.
I will add.
We're on .NET 3.5 SP1 - is HMACSHA256 supported after the patch? I don't see it listed on the MSDN page for version 3.5, only on .NET 4...
Correct - the validation key was not used in URL generation pre-patch. It
is used post-patch. We try to make sure that the generated URL is stable both pre- and post-patch, as both WebResource.axd and ScriptResource.axd require stable URLs in order to get advantages from caching.
For .NET 3.5 SP1, we recommend using SHA1 (which is the default algorithm) for validation. HMACSHA256 wasn't supported until .NET 4.
Marked as answer by mbanavige on Dec 28, 2010 12:44 AM
We have the same problem since we upgraded to .NET framework 4.0, we haven't installed the fix to any of our webnodes but still experience this error. The web mashines used shared file system and the site files are actually the same. Will this update fix our problem or
we have another issue with our site?
The issue may be that a recent patch for ASP.NET 4.0 changes the encrypt/decrypt function and you will have this error if your machines are at different patch levels.
MrWonka
0 Points
1 Post
WebResource.axd errors
Nov 24, 2010 10:18 AM|LINK
I'm getting errors on my website when trying to retrieve content via the WebResource.axd provider. I'm running Windows Server 2008 on two machines that are network load balanced. Both sites web.config are identical (mirrored via robocopy) and contain a <machineKey /> directive. The error occurs when a page served by machine 1 requests a script from machine 2. The machine 2 event log reports
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="ASP.NET 2.0.50727.0" /> <EventID Qualifiers="32768">1309</EventID> <Level>3</Level> <Task>3</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2010-11-24T11:08:25.000Z" /> <EventRecordID>13144</EventRecordID> <Channel>Application</Channel> <Computer>02.mywebsite.com</Computer> <Security /> </System> <EventData> <Data>3005</Data> <Data>An unhandled exception has occurred.</Data> <Data>24/11/2010 11:08:25</Data> <Data>24/11/2010 11:08:25</Data> <Data>258925b210164fccb0cba5ba5ee9d575</Data> <Data>44359</Data> <Data>1633</Data> <Data>0</Data> <Data>/LM/W3SVC/1/ROOT-3-129350691546618622</Data> <Data>Full</Data> <Data>/</Data> <Data>E:\CMSLive\</Data> <Data>02</Data> <Data> </Data> <Data>48164</Data> <Data>w3wp.exe</Data> <Data>NT AUTHORITY\NETWORK SERVICE</Data> <Data>CryptographicException</Data> <Data>Length of the data to decrypt is invalid.</Data> <Data>http://mywebsite.com/WebResource.axd?d=_on9biI-K6SuQqcJS7_8niVQDrkwoqhB5clsFCL-BWsnsvfIdwtsTVKoYl1o5daqtwo1b1vuD-QshhMpXgT-fsB7u7_rw50OMm3CTeouHDFaG4NcWyzPv-5fYUC-EvpOVVLtZIqgiyL_EZYqbgc2NYgLSoA1&t=634251602713396228&build=602798</Data> <Data>/WebResource.axd</Data> <Data>xxx.xxx.xxx.xxx</Data> <Data> </Data> <Data>False</Data> <Data> </Data> <Data>NT AUTHORITY\NETWORK SERVICE</Data> <Data>14814</Data> <Data>NT AUTHORITY\NETWORK SERVICE</Data> <Data>False</Data> <Data> at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) at System.Security.Cryptography.CryptoStream.FlushFinalBlock() at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, IVType ivType, Boolean useValidationSymAlgo) at System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType) at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) </Data> </EventData> </Event>We're getting *many* of these event reports every minute since the site is quite active. The problem manifests to the user as the complete failure of JS on the site (One of the WebResource calls loads jQuery, without which everything breaks)
I'm unable to figure out exactly what, at this point, is causing the error - though I do know this security fix was installed as part of the server build for these boxes. But since similar errors are being reported on this site I figured I 'd throw mine in. The quick fix is to put session affinity on our LB but that comes with it's own issues at the moment which we'd rather avoid.
<div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Log Name: Application</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Source: ASP.NET 2.0.50727.0</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Date: 24/11/2010 11:08:25</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Event ID: 1309</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Task Category: Web Event</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Level: Warning</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Keywords: Classic</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">User: N/A</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Computer: UIWWWCMS02.ad.nottingham.ac.uk</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Description:</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Event code: 3005 </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Event message: An unhandled exception has occurred. </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Event time: 24/11/2010 11:08:25 </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Event time (UTC): 24/11/2010 11:08:25 </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Event ID: 258925b210164fccb0cba5ba5ee9d575 </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Event sequence: 44359 </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Event occurrence: 1633 </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Event detail code: 0 </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Application information: </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Application domain: /LM/W3SVC/1/ROOT-3-129350691546618622 </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Trust level: Full </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Application Virtual Path: / </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Application Path: E:\CMSLive\ </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Machine name: UIWWWCMS02 </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Process information: </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Process ID: 48164 </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Process name: w3wp.exe </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Account name: NT AUTHORITY\NETWORK SERVICE </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Exception information: </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Exception type: CryptographicException </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Exception message: Length of the data to decrypt is invalid. </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Request information: </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Request URL: http://www.nottingham.ac.uk/WebResource.axd?d=_on9biI-K6SuQqcJS7_8niVQDrkwoqhB5clsFCL-BWsnsvfIdwtsTVKoYl1o5daqtwo1b1vuD-QshhMpXgT-fsB7u7_rw50OMm3CTeouHDFaG4NcWyzPv-5fYUC-EvpOVVLtZIqgiyL_EZYqbgc2NYgLSoA1&t=634251602713396228&build=602798 </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Request path: /WebResource.axd </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> User host address: 128.243.80.186 </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> User: </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Is authenticated: False </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Authentication Type: </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Thread account name: NT AUTHORITY\NETWORK SERVICE </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Thread information: </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Thread ID: 14814 </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Thread account name: NT AUTHORITY\NETWORK SERVICE </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Is impersonating: False </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Stack trace: at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> at System.Security.Cryptography.CryptoStream.FlushFinalBlock()</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, IVType ivType, Boolean useValidationSymAlgo)</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> at System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType)</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Custom event details: </div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Event Xml:</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"><Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <System></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Provider Name="ASP.NET 2.0.50727.0" /></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <EventID Qualifiers="32768">1309</EventID></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Level>3</Level></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Task>3</Task></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Keywords>0x80000000000000</Keywords></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <TimeCreated SystemTime="2010-11-24T11:08:25.000Z" /></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <EventRecordID>13144</EventRecordID></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Channel>Application</Channel></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Computer>UIWWWCMS02.ad.nottingham.ac.uk</Computer></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Security /></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> </System></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <EventData></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>3005</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>An unhandled exception has occurred.</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>24/11/2010 11:08:25</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>24/11/2010 11:08:25</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>258925b210164fccb0cba5ba5ee9d575</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>44359</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>1633</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>0</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>/LM/W3SVC/1/ROOT-3-129350691546618622</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>Full</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>/</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>E:\CMSLive\</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>UIWWWCMS02</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> </Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>48164</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>w3wp.exe</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>NT AUTHORITY\NETWORK SERVICE</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>CryptographicException</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>Length of the data to decrypt is invalid.</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>http://www.nottingham.ac.uk/WebResource.axd?d=_on9biI-K6SuQqcJS7_8niVQDrkwoqhB5clsFCL-BWsnsvfIdwtsTVKoYl1o5daqtwo1b1vuD-QshhMpXgT-fsB7u7_rw50OMm3CTeouHDFaG4NcWyzPv-5fYUC-EvpOVVLtZIqgiyL_EZYqbgc2NYgLSoA1&t=634251602713396228&build=602798</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>/WebResource.axd</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>128.243.80.186</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> </Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>False</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> </Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>NT AUTHORITY\NETWORK SERVICE</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>14814</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>NT AUTHORITY\NETWORK SERVICE</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data>False</Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> <Data> at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> at System.Security.Cryptography.CryptoStream.FlushFinalBlock()</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, IVType ivType, Boolean useValidationSymAlgo)</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> at System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType)</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"></Data></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> </EventData></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"></Event
</div>security webresource request decryption error
cts-mgraham
Contributor
3318 Points
642 Posts
Microsoft
Re: WebResource.axd errors
Nov 30, 2010 11:27 AM|LINK
Please make sure that both machines have the MS10-070 patch. There was a change in the way that encryption and decryption is done,
so if one has the fix, and one doesn't there will be problems. Please see the following for the appropriate KB numbers for the installs:
http://weblogs.asp.net/scottgu/archive/2010/09/28/asp-net-security-update-now-available.aspx
If you cannot install the fix on all machines, you could revert to legacyEncryption on those with the fix:
2425938 How to configure legacy encryption mode in ASP.NET
http://support.microsoft.com/default.aspx?scid=kb;en-US;2425938
Let me know if this helps.
jim_harte
Member
4 Points
5 Posts
Re: WebResource.axd errors
Dec 03, 2010 03:47 PM|LINK
We're having the same issue here. I've got two servers with the same machine key and after installing the patch on both servers, they're generating different (and incompatible) urls for the same resources (via both WebResource.axd and ScriptResource.axd). The machine.config has this on both servers:
<machineKey decryption="AES" decryptionKey="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"/>
where "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" is identical on both machines.
Is there something else I should be comparing between the two boxes to get them to generate the same encrypted URLs?
HELP!
levib
Star
7702 Points
1099 Posts
Microsoft
Re: WebResource.axd errors
Dec 04, 2010 09:51 PM|LINK
Does your <machineKey> section also have a validation key for both machines? You're required to specify both an encryption and a signing key if you deploy across a farm. See http://msdn.microsoft.com/en-us/library/w8h3skw9.aspx for more information.
Generally we recommend that the validation key algorithm be HMACSHA256, so the validation key itself would be 64 hexadecimal characters, randomly generated just like the encryption / decryption key. Note: You must not use the same key for decryption as you do for verification.
jim_harte
Member
4 Points
5 Posts
Re: WebResource.axd errors
Dec 06, 2010 08:42 PM|LINK
No, it doesn't. These machines are not actually part of a farm, I just need to make sure the encrypted string never changes (don't ask - it's a bad design and not mine). I guess the validation key was not used in generating these URLs before the patch. I will add.
We're on .NET 3.5 SP1 - is HMACSHA256 supported after the patch? I don't see it listed on the MSDN page for version 3.5, only on .NET 4...
levib
Star
7702 Points
1099 Posts
Microsoft
Re: WebResource.axd errors
Dec 06, 2010 09:05 PM|LINK
Correct - the validation key was not used in URL generation pre-patch. It is used post-patch. We try to make sure that the generated URL is stable both pre- and post-patch, as both WebResource.axd and ScriptResource.axd require stable URLs in order to get advantages from caching.
For .NET 3.5 SP1, we recommend using SHA1 (which is the default algorithm) for validation. HMACSHA256 wasn't supported until .NET 4.
fasho
Member
2 Points
2 Posts
Re: WebResource.axd errors
Feb 11, 2011 01:26 PM|LINK
We have the same problem since we upgraded to .NET framework 4.0, we haven't installed the fix to any of our webnodes but still experience this error. The web mashines used shared file system and the site files are actually the same. Will this update fix our problem or we have another issue with our site?
Thanks!
bartekm
Member
240 Points
106 Posts
Re: WebResource.axd errors
Jun 15, 2011 10:46 PM|LINK
The issue may be that a recent patch for ASP.NET 4.0 changes the encrypt/decrypt function and you will have this error if your machines are at different patch levels.
More details here.
http://blog.evonet.com.au