diff --git a/Sdl.Web.Mvc/Controllers/HandleSectionErrorAttribute.cs b/Sdl.Web.Mvc/Controllers/HandleSectionErrorAttribute.cs index c00f11af..eeb6e699 100644 --- a/Sdl.Web.Mvc/Controllers/HandleSectionErrorAttribute.cs +++ b/Sdl.Web.Mvc/Controllers/HandleSectionErrorAttribute.cs @@ -13,7 +13,7 @@ public override void OnException(ExceptionContext filterContext) base.OnException(filterContext); Log.Error(filterContext.Exception); ViewDataDictionary data = new ViewDataDictionary(new HandleErrorInfo(filterContext.Exception, (string)filterContext.RouteData.Values["controller"], (string)filterContext.RouteData.Values["action"])); - filterContext.Result = new ViewResult { ViewName = View, ViewData = data }; + filterContext.Result = new PartialViewResult { ViewName = View, ViewData = data }; filterContext.ExceptionHandled = true; filterContext.HttpContext.Response.TrySkipIisCustomErrors = true; } diff --git a/Site/Views/Shared/ServerError.cshtml b/Site/Views/Shared/ServerError.cshtml index 1047600e..ef6d61e1 100644 --- a/Site/Views/Shared/ServerError.cshtml +++ b/Site/Views/Shared/ServerError.cshtml @@ -1,4 +1,7 @@ - +@{ + Layout = ""; +} +