CryptographicException: Padding is invalid and cannot be removed

Discussion in 'ASP.NET 2.0' started by Marina, Sep 25, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I get visitors (or bots?) visiting my site and sometimes the following error occurs:

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

    Stack:
    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)


    Method:
    Int32 DecryptData(Byte[], Int32, Int32, Byte[] ByRef, Int32, System.Security.Cryptography.PaddingMode, Boolean)


    Source:
    mscorlib

    This error occurs when using a URL such as http://www.rolinka.com/WebResource.axd?d=3us2Y5XaY9P0iXpZPfPeZQ2&t=633253311525842705

    This error appears to occur straight away, even before any code in the Session_Start event in Global.asax is executed.


    Does anyone have any idea what the cause of the problem is, and how to fix it?

    Also, why does anyone visit with a link including the "WebResource.axd?....." part in it?

    Thanks,
    Marina
     
  2. Bruce

    Bruce DiscountASP.NET Staff

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page