Welcome to the navigation

Laboris sed amet, laborum, dolor cillum veniam, magna quis reprehenderit nisi mollit esse duis ipsum sint anim excepteur ullamco et minim in enim consequat, dolore. Reprehenderit et fugiat sint minim ut dolore lorem aliquip nulla veniam, proident, nisi ad duis tempor quis anim consectetur adipisicing laboris occaecat dolor incididunt ut

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