title: Return an error when invalid parameters are specified in ASP Web API
body: <p>I'm creating an API using C# and ASP.NET Web API and I want it to return an error when a parameter is used that isn't recognised.</p>
  
  <p>For example:</p>
  
  <pre><code>/api/Events
  </code></pre>
  
  <p>should a list of events</p>
  
  <pre><code>/api/Events?startTime={{startTime}}
  </code></pre>
  
  <p>should return a list of events that started at a particular time</p>
  
  <pre><code>/api/Events?someRandomInvalidParameter={{something}}
  </code></pre>
  
  <p>should return an error</p>
  
  <p>Is there a nice config way to do this? If not, how can I get a list of parameters to check myself.</p>