Padding is invalid and cannot be removed.

Stop Google crawling WebResource.axd & ScriptResource.axd
As an ASP.NET developer i often get error message: “Padding is invalid and cannot be removed”. It’s a pretty annoying message that i have been trying to get rid of for days. It was caused by Google trying to index, crawl my WebResource.axd and session. But when the session expires you get this error message. Since Google caches the pages it visits the session on this page has already expired after it is crawled, when it tries to crawl the page again and request the WebResource.axd or ScriptResource.axd with an old key, an exception is raised.

Therefore to solve this problem the simple solution for that is to modify your robots.txt file in your root directory

and add the following at the end

Disallow: /ScriptResource.axd
Disallow:/WebResource.axd

With this no more issues regarding invalid padding.

If this does not solve your issue you can take a look at what other users propose here.

Some update on this issue, i found out while googling some days back:

On this post you can find out how to compress the webresource.axd and also somewhere in between prevent this error to occur.
http://mironabramson.com/blog/post/2007/10/New–Shiny–WebResourceaxd-compression-Module.aspx

Use the tool found at the website below to generate a machine key and a decryption key:
http://www.orcsweb.com/articles/aspnetmachinekey.aspx

Leave a Reply

Your email address will not be published. Required fields are marked *