Welcome to the navigation

Dolor incididunt excepteur in aute qui et ut dolor consectetur enim velit consequat, nostrud sunt culpa duis non dolore pariatur, ea nisi cupidatat eu proident. Dolor amet, excepteur ea in pariatur, fugiat cupidatat laborum, sint est id eu mollit incididunt dolor occaecat sit proident, sunt ipsum irure labore reprehenderit consequat

Yeah, this will be replaced... But please enjoy the search!

Creating your custom HttpControllerContext for Web API

I needed to fiddle a bit in a API method returning a HttpResponseMessage when validating captchas that wasn't included in the model validation.

HttpConfiguration config = new HttpConfiguration();
IHttpRouteData route = new HttpRouteData(new HttpRoute());
HttpRequestMessage req = new HttpRequestMessage();
req.Properties[HttpPropertyKeys.HttpConfigurationKey] = config;
req.Properties[HttpPropertyKeys.HttpRouteDataKey] = route;
HttpControllerContext context = new HttpControllerContext(config, route, req);