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
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.
Use the tool found at the website below to generate a machine key and a decryption key:
Lately i have been trying to get a grasp of the anchor value from the URL using ASP.NET. From what i learned from the forum (This might be wrong since there is a way in PHP(http://www.php.net/manual/en/function.parse-url.php) to get the anchor value.)
The url above send the user to a page product and then your browser interpret the anchor and scroll down way to the description anchor. But the question is why the heck would i want to get the anchor since it’s just an anchor ? There might be several reasons for that. Here is 2 of them:
- You might not want to pass an extra parameter in your URL query string because of Referencing issues
There might be several other reasons, but these two give you and idea of what is to be achieved.
var url = document.location;
var strippedUrl = url.toString().split("#");
if(strippedUrl.length > 1)
anchorvalue = strippedUrl;
Here is a bug that i came to recently while working with:
var d = document.createElement(“div”);
This bug is only on IE and it’s really annoying one. There is a fix provided by Microsoft, you can take a look at it here.
It is a pretty comprehensive and complete article but there is one thing missing in there. The state that the problem is caused
This problem occurs because a child container HTML element contains script code that tries to modify the parent container element of the child container. The script code tries to modify the parent container element by using either the innerHTML method or the appendChild method.
The solution is
To work around this problem, write script blocks that only modify closed containers or that only modify the script’s immediate container element. To do this, you can use a placeholder to close the target container, or you can move the script block into the container that you want to modify.
Here is a quick fix that works pretty fine and easy to implement.
var d = document.createElement(“div”);
if(is_ie) //This is a browser check have to code here.
var ie_fix = document.getElementById(“ie_fix”);
This is a quick fix that should help you waste/avoid unnecessary recoding. This has been Tested on IE 7 – Running on Windows Vista.
Good news i have been kinda motivated this weekend after my session of water sports 🙂 I have decided that i should creat a word press plugin to be able to interact with Google Maps. This saturday i have been working the whole day on it… it’s not in a fully working version already but here are some of the features that i want to include in the first release of the plugin.
- Integration of WP rich text editor
- Marker with editable HTML text info window for marker ( Where you will be able to say something about the location you have pointed out)
Only these 2 features to start with… 🙂
Coming features would be
- Polyline ability
- Dragable markers
- Easy photo include in the HTML text info window for marker
I plan on releasing the first version end of this week.