Turned out it could be simplified as:
ActionResult originatingActionResult = new RedirectToRouteResult(
new RouteValueDictionary(filterContext.RouteData.Values));
However...
The project uses T4MVC and RedirectToAction
couldn't be used as it is overridden on the controller and expects GetT4MVCResult()
to be present on the ActionResult
.
So I ended up doing it like this instead:
RouteValueDictionary originatingRouteValues = new RouteValueDictionary(
actionExecutingContext.RouteData.Values);
// ... followed by ...
return this.RedirectToRoute(routeValues);