An ASP.NET bug from 1973
Today, I was coding an ASP.NET 4.5 REST api using WebApi 2, and was caught out by a problem caused by a technical decision made forty two years ago.
I think I need to repeat that again. FORTY TWO years ago. (Yes, it's spelt f-o-r-t-y, not f-o-u-r-t-y, thanks anonymous pedantic reader!)
1973! The year when Aerosmith released their debut album! The year Elvis Presley's concert in Hawaii had more watchers than the moon landing!
Apparently, in ASP.NET, having a URL end in "AUX" causes it to throw a 404 error.
This might happen if you were building a RESTful web service that validated country codes. For example, you might make a request to this URL
Which would return "New Zealand".
Or maybe you're testing Australia:
And then of course, you want to test your web service to see what would happen if you passed through invalid country code:
Which gives you a 404 error, thanks to CP/M, an operating system coded in 1973
What a conundrum! Do I fix it or apply the patch?
Microsoft have a fix for this
, but it's not enabled by default
. Yes, it's NOT enabled by default. Seriously.