I have a stock query application that returns data based upon a stock symbol.
Basically, the AJAX call goes to
This works fine… generally. Today I found that the stock “Progressive Waste Solutions Ltd.”, which has a symbol of BIN, blew up. Looking at the return data in the browser, I see it’s returning a 404 for this symbol.
It occurred to me that BIN might be a reserved word, asking for some binary file or something. Is this the case? How do I work around this without a whole lot of effort? Are there other keywords that will also cause this problem?
Per Artyom Neustroev, this could be a reserved keyword, and would be protected from routing to. He referenced an article which referenced a website which stated the way around this was to add the following configuration setting in the config file:
The routing mechanism takes into account hidden directories and files (like web.config, /bin, etc) and hides them from people. For some of these, the rules can be relaxed a bit, as they are handled in code. These “keywords” are:
NUL. These can actually be referenced with a change to your web.config file as such:
<configuration> <system.web> <httpRuntime relaxedUrlToFileSystemMapping="true"/> <!-- ... your other settings ... --> </system.web> </configuration>