/// <summary>
 /// Invokes an action that displays a custom view.
 /// The convention specifies that there is a shared view with a name NotFound.
 /// </summary>
 /// <param name="controllerContext">The controller context.</param>
 protected void InvokeNotFoundAction(ControllerContext controllerContext)
 {
     controllerContext.RequestContext.RouteData.Values["controller"] = "HttpErrors";
     controllerContext.RequestContext.RouteData.Values["action"] = "NotFound";
     IController controller = new HttpErrorsController();
     controller.Execute(controllerContext.RequestContext);
 }
        /// <summary>
        /// Invokes an action that displays a custom view.
        /// The convention specifies that there is a shared view with a name NotFound.
        /// </summary>
        /// <param name="controllerContext">The controller context.</param>
        protected void InvokeNotFoundAction(ControllerContext controllerContext)
        {
            controllerContext.RequestContext.RouteData.Values["controller"] = "HttpErrors";
            controllerContext.RequestContext.RouteData.Values["action"]     = "NotFound";
            IController controller = new HttpErrorsController();

            controller.Execute(controllerContext.RequestContext);
        }
        public bool InvokeAction(ControllerContext controllerContext, string actionName)
        {
            if (InvokeActionWithNotFoundCatch(controllerContext, actionName))
            {
                return true;
            }

            controllerContext.RequestContext.RouteData.Values["controller"] = "HttpErrors";
            controllerContext.RequestContext.RouteData.Values["action"] = "NotFound";
            IController controller = new HttpErrorsController();
            controller.Execute(controllerContext.RequestContext);

            return true;
        }