protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType) { if (controllerType != null) return container.Resolve(controllerType) as IController; throw new HttpException(404, String.Format("The controller for path '{0}' could not be found or it does not implement IController.", requestContext.HttpContext.Request.Path)); } }