0
我正在尝试在Application_Error中的全局级别自定义错误处理。Asp.net MVC 3查看引擎错误
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);
视图“Error”是否存在于〜/ Views/Shared /或〜/ Views/Error /目录中? –