Я пытаюсь выполнить пользовательскую обработку ошибок на глобальном уровне в Application_Error.
Exception ex = Server.GetLastError();
Server.ClearError();
AssortmentDefinitionLogManager.LogException(ex);
Context.RewritePath("/Error/Error");
IHttpHandler httpHandler = new MvcHttpHandler();
httpHandler.ProcessRequest(Context);
Но я получаю эту ошибку
Error Message - The view '~/Views/Shared/Error' or its master was not found or no view engine supports the searched locations.
Я также пытался это
var urlHelper = new UrlHelper(HttpContext.Current.Request.RequestContext);
var redirectUrl = urlHelper.Action("Error", "Error");
Response.Redirect(redirectUrl);