Using ASP.NET Core MVC, is there a way to return BadRequest
for a HTTP request that includes a query parameter that is not used by the controller?
I'm not trying to return an error on some specific query parameters being present, I want to reject all requests that include query parameters that the server doesn't parse to something meaningful.
So, in other words, it's OK for valid query parameters to be absent, but not OK for invalid/unrecognized query parameters to be present.