title: Why do these URL segments result in 404s?
body: <p>Our tester is a master of fuzz testing.</p>
  
  <p>He has discovered that putting certain values into URL segments in our web API always seems to result in a 404, but I cannot work out why. Here are some examples:</p>
  
  <ul>
  <li><code>.,#';][=-&gt;</code>    => 404</li>
  <li><code>&lt;~@:}{+_)</code>     => 404</li>
  <li><code>+</code> => 404</li>
  <li><code>.,#</code> => 404</li>
  <li><code>.#,</code> => routes correctly</li>
  </ul>
  
  <p>So for example, a route that normally looks like </p>
  
  <p><code>http://api.mythingy.com/one/two/three</code></p>
  
  <p>If you change one of the segments to one of the 'bad strings' above:</p>
  
  <p><code>http://api.mythingy.com/one/.,#/three</code></p>
  
  <p>Always gives a 404.</p>
  
  <p>I can't see anything resembling escape sequences in there. I do see some dodgy values (such as <code>&lt;</code>, but the '404' behaviour seems to take precedence over the 'bad request' behaviour.</p>
  
  <p>Can anyone suggest why this happens?</p>
  
  <p><strong>Edit:</strong> using the debugger tells me that the application itself isn't hit (i.e. a breakpoint in Global.asax Application_BeginRequest() does not get hit). So presumably this is occurring in IIS.</p>