Welcome to the navigation

Voluptate irure deserunt nulla adipisicing officia non sint aute in enim velit est labore tempor commodo eiusmod consectetur qui cupidatat dolore occaecat esse anim amet. Amet, dolore et voluptate ullamco quis irure laboris sunt ut pariatur, in est sit veniam, reprehenderit laborum, nulla cillum ipsum exercitation in culpa proident, anim

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