If I create a simple controller in ASP.NET Web API like this:
[RoutePrefix("values")]
public class ValuesController : ApiController
{
[Route("{value}")]
public string Get(string value)
{
return value;
}
}
Performing a get on /values/nul
returns a 404 page on IIS and IIS express.
Also /values/nul.be
returns 404.
A breakpoint in the controller is never hit in this case, so the request is terminated before it reaches the controller's logic.
Is there a work around for this or is this a bug in ASP.NET Web API?