This is a migrated thread and some comments may be shown as answers.

Padding is invalid and cannot be removed

4 Answers 99 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Marco du Plessis
Top achievements
Rank 1
Marco du Plessis asked on 14 May 2010, 01:53 PM

Hi ,

My asp.net page contains a radscheduler , whenever I view this page I get the following error.

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

4 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 18 May 2010, 01:36 PM
Hi Marco,

This is a common problem with the WebResource.axd ASP.NET handler in web farms. You need to set the machine key to be the same on all servers. More information, as well as further troubleshooting advice can be found in this series of blog posts:

http://blogs.telerik.com/AtanasKorchev/Posts/08-07-18/Web_Resources_demystified_Part_3_Troubleshooting.aspx

I hope this helps.

All the best,
Tsvetomir Tsonev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Marco du Plessis
Top achievements
Rank 1
answered on 28 Jun 2010, 08:50 AM
Hi ,

I am still experiencing this problem, we dont have a server farm environment setup at our hosting company, is there no other possible solution.
0
T. Tsonev
Telerik team
answered on 28 Jun 2010, 12:36 PM
Hello Marco,

The machine key will also change when the application pool is restarted so the problem is not only with web farms. Setting it to a fixed value should solve the problem.

Greetings,
Tsvetomir Tsonev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Craig Wallace
Top achievements
Rank 1
answered on 18 Jul 2011, 09:54 AM
Hi Tsvetomir,

We have been experiencing this problem with the 2011.1.519.40 version of the Telerik Ajax controls.  There were also a lot of fragmented responses that broke the ajax as parts of the page were missing.  Rolling back to 2010.3.1215.40 stopped the errors again.  I am going to try the latest version and see if the problem is fixed.  This was never a problem for us until 2011.1.519.40.

Craig
Tags
Scheduler
Asked by
Marco du Plessis
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Marco du Plessis
Top achievements
Rank 1
Craig Wallace
Top achievements
Rank 1
Share this question
or