Re: Padding is invalid and cannot be removed.



I get this error once in a while in once of my web applications, and after
doing some searching on Google, it sounds like the error is caused by Google
trying to get information from sites to rank them.

Not sure if it is true, but it was the only information I found...


"Amelyan" <bamelyan@xxxxxxxxx> wrote in message
news:%23uKP8GT3HHA.4676@xxxxxxxxxxxxxxxxxxxxxxx
Why does this happen? How to fix it?

Once in a while I get error in ~/ScriptResource.axd?d=...

System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. --->
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)

--- End of inner exception stack trace ---

at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[]
arguments, SignatureStruct& sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner)

at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[]
arguments, Signature sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner)

at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture,
Boolean
skipVisibilityChecks)

at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)

at System.Web.Handlers.ScriptResourceHandler.DecryptString(String s)

at
System.Web.Handlers.ScriptResourceHandler.DecryptParameter(NameValueCollection
queryString)

at System.Web.Handlers.ScriptResourceHandler.ProcessRequest(HttpContext
context)

at
System.Web.Handlers.ScriptResourceHandler.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)







.



Relevant Pages

  • event warning COM+ SOAP Services
    ... I see a warning about COM+ SOAP Services. ... at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Objectarguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) ... at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Objectparameters, CultureInfo culture, Boolean skipVisibilityChecks) ...
    (microsoft.public.windowsxp.general)
  • Re: Monad Beta 2 Released!
    ... been thrown by the target of an invocation. ... ents, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle ... Attr, Binder binder, Objectparameters, CultureInfo culture, Boolean skipVisib ...
    (microsoft.public.windows.server.scripting)
  • System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
    ... inputBuffer, Int32 inputOffset, Int32 inputCount, Byte& outputBuffer, ... Int32 outputOffset, PaddingMode paddingMode, Boolean fLast) ... invokeAttr, Binder binder, Objectparameters, CultureInfo culture, Boolean ...
    (microsoft.public.dotnet.framework.aspnet)
  • Padding is invalid and cannot be removed.
    ... inputBuffer, Int32 inputOffset, Int32 inputCount, Byte& outputBuffer, ... Int32 outputOffset, PaddingMode paddingMode, Boolean fLast) ... invokeAttr, Binder binder, Objectparameters, CultureInfo culture, Boolean ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Padding is invalid and cannot be removed.
    ... inputBuffer, Int32 inputOffset, Int32 inputCount, Byte& outputBuffer, ... Int32 outputOffset, PaddingMode paddingMode, Boolean fLast) ... invokeAttr, Binder binder, Objectparameters, CultureInfo culture, Boolean ...
    (microsoft.public.dotnet.framework.aspnet)