Welcome to the navigation

Aute voluptate sed veniam, ut in exercitation quis enim occaecat reprehenderit qui et tempor sint consequat, culpa ad ea deserunt dolore est cillum eiusmod ipsum. Velit aliquip ut ut dolore anim eu eiusmod dolor commodo non in aliqua, dolor magna voluptate excepteur ullamco labore mollit et officia do veniam, cillum

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);
Please note that this portal is a BETA site , I will continuously improve all functionality and performance during the coming weeks / the author