title: Why does my action method with default parameters cause a 404?
body: <p>I've got a WebApi action method that does this:</p>
  
  <pre><code>Public Function GetSomething(Id As Integer, Optional SomeValue As Integer = 0) As HttpResponseMessage
  </code></pre>
  
  <p>I have the standard route in place:</p>
  
  <pre><code>    routes.MapHttpRoute _
      (
          "DefaultWebApi",
          "api/{controller}/{action}"
      )
  </code></pre>
  
  <p>If I call my route specifying <code>Id</code> <strong>AND</strong> <code>SomeValue</code>, it works fine:</p>
  
  <pre><code>/api/MyController/GetSomething?Id=123&amp;SomeValue=345
  </code></pre>
  
  <p>But if I don't specify <code>SomeValue</code>, I get a 404:</p>
  
  <pre><code>/api/MyController/GetSomething?Id=123
  </code></pre>
  
  <p>I don't understand this at all, because <code>SomeValue</code> is Optional.  If I don't specify it, I would expect the framework to call my method and just pass the default value, and I think this is what MVC (not WebApi) does.  What am I doing wrong here?</p>