+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Periodic "Padding is invalid and cannot be removed" error...

Periodic "Padding is invalid and cannot be removed" error...

4 posts, 0 answered
  1. Isaac
    Isaac avatar
    63 posts
    Registered:
    01 Dec 2008
    14 Dec 2009
    Link to this post
    Periodially, I mean once or twice every couple of days I am getting this error reported to me by our Sitefinity 3.6 SP1 installation:

       
    An error occurred in the application:
    Padding is invalid and cannot be removed.
    Stack Trace:
    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, IVType ivType, Boolean useValidationSymAlgo) at
    System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType) at
    System.Web.UI.Page.DecryptString(String s) at
    System.Web.Handlers.ScriptResourceHandler.DecryptParameter(NameValueCollection queryString)

    Form Data:

    Query String: d=899mev1i3ow87p-wgnlhnkmf5oc1xiqwtzdbditexioq-hxaycdzwe6cq16ok9fmedwsggtb_lkg0obe8mcpk0ydsalhbqx0lhhy1im4f2rlkkcqq_2gqapm9hb3tams0&%3bt=6586f372
        

    Anyone have any ideas what might be causing this or what I might need to do to fix it?

    Thank you

    -nathan


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    14 Dec 2009
    Link to this post
    Hi Nathan,

    The following post describes the problem you have “Padding is Invalid and cannot be removed”. If you have any custom logic that uses RijndaelManaged ASP.NET class this could also be a problem.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Isaac
    Isaac avatar
    63 posts
    Registered:
    01 Dec 2008
    16 Dec 2009
    Link to this post
    Ivan,

    I have added a fixed Machine Key to the web.config file for the application and I am still getting the "Padding is invalid and cannot be removed" error.

    I am not using any custom code or 3rd party code that uses the Rijndael library.  Any other ideas?

    -nathan
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    17 Dec 2009
    Link to this post
    Hi Nathan,

    You can take a look at the following post Padding is invalid and cannot be removed that provides several suggestions. I hope that this will helps you, although the machine key should fix the problem.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
4 posts, 0 answered