Welcome to the navigation

Cillum consequat, occaecat lorem velit cupidatat enim reprehenderit adipisicing est magna ut commodo dolore nulla amet, id nisi in proident, fugiat ullamco ea ipsum consectetur. Laboris ea labore veniam, cupidatat ullamco enim dolor ut ut esse sunt qui quis proident, aute adipisicing reprehenderit aliqua, non tempor dolor dolore sit eiusmod

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);