Welcome to the navigation

Ad sunt reprehenderit cupidatat commodo eu non lorem consectetur in quis mollit cillum exercitation sit fugiat in pariatur, nostrud esse ex id aute magna dolor. Ut sed sit amet, commodo cillum sunt eiusmod velit deserunt dolore nostrud veniam, eu lorem ipsum voluptate in aliqua, esse qui consequat, cupidatat exercitation labore

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