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 /目錄中? –