Created
May 5, 2014 21:13
-
-
Save stevejay/beb2f5018182d78d9941 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var routeData = new RouteData(); | |
routeData.Values.Add("controller", ErrorControllerRouteName); | |
routeData.Values.Add("action", actionName); | |
var requestContext = new RequestContext( | |
new HttpContextWrapper(HttpContext.Current), | |
routeData); | |
var controllerFactory = ControllerBuilder.Current.GetControllerFactory(); | |
var controller = controllerFactory.CreateController( | |
requestContext, | |
ErrorControllerRouteName); | |
controller.Execute(requestContext); | |
HttpContext.Current.Server.ClearError(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment