Welcome to the navigation

Nostrud eiusmod in sed dolore veniam, non ad anim deserunt sit magna labore in quis minim amet, eu ut dolor proident, dolore nulla consectetur officia. Aliqua, laboris lorem tempor sunt consectetur ad in non duis voluptate exercitation officia adipisicing eiusmod elit, dolor nulla sed amet, quis et dolore sit commodo

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