Strange error-(WebResource.axd) CryptographicException: Padding is invalid and cannot be removed.

B

Brent K

Ok, I have an internal intranet website created in visual studio 2005, c#.
It was running fine for months, and then all of the sudden a few days I
started getting these errors emailed to me (I have it set up to email me
exceptions). Here is the error. I have gotten this error probably 100 times
in the last 2 days.

I have googled this error to no avail. My program is not doing any
decrypting, I am not on a web farm, I have reset the web server. The website
is internal, not on internet.

Exception Thrown

Module:
http://intranet/WebResource.axd?d=_9PVU2juk255_dSftXLwlg2&t=632967410635716438

Exception Information: System.Security.Cryptography.CryptographicException:
Padding is invalid and cannot be removed.

at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer,
Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)

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, Boolean
useValidationSymAlgo)

at System.Web.UI.Page.DecryptString(String s)

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)
 
B

bruce barker

WebResource.axd is a builtin handler that returns resource strings.
asp.net returns javscript and builtin images this way. to keep anyone
from reading any resource string, you pass an encrypted request args
(there is an api to generate this).

because the encryption key is regenerated at startup, a recycle can
cause this error. check the error log for recycle events.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,787
Messages
2,569,630
Members
45,338
Latest member
41Pearline46

Latest Threads

Top