Quick post on something I came across the other day. We had a requirement to include a dot in the URL, something along the lines of "blah/something2.0/blah". If you try this with a brand new MVC site you would normally get a 404 HTTP response code when trying to access the URL.
A quick google search led me to a page by Phil Haack (I love his blog posts) titled Putting the Con (COM1, LPT1, NUL, etc.) Back in your URLs. He mentioned a simple fix by adding the following to your web.config
<configuration> <system.web> <httpRuntime relaxedUrlToFileSystemMapping="true"/> </system.web> </configuration>
Brilliant, I open my web.config, pasted in the setting and ... nothing. Still a 404? Took another look and realised that for IIS7+, you need to update the system.webServer section of your web.config. Another quick google search and I found the following snippet:
<system.webServer> <modules runAllManagedModulesForAllRequests="true"></modules> <!-- other settings --> </system.webServer>
Browse to the url and it works.
Hopefully this saves someone out there an hour or two. As always, feedback welcome.