internal PartialViewResult GetPartialView_PageNotFound() { var contentID = uQuery.GetNodesByName(CONSTVALUE.PAGE_NOT_FOUND_CONTENT_NAME).FirstOrDefault().Id;; IContent data = ApplicationContext.Services.ContentService.GetById(contentID); PageNotFound pageNotFoundModel = new PageNotFound() { ErrorCode = Convert.ToString(data.GetValue("errorCode")), ErrorTitle = Convert.ToString(data.GetValue("errorTitle")), ErrorDescription = Convert.ToString(data.GetValue("errorDescription")), }; return(PartialView(CONSTVALUE.PARTIAL_VIEW_ERROR_FOLDER + "_404.cshtml", pageNotFoundModel)); }
public PartialViewResult PageNotFound(IErrorPage page) { ViewBag.rootUrl = string.Format("{0}://{1}{2}", Request.Url.Scheme, Request.Url.Authority, Url.Content("~")); if (page.ErrorCode.Equals("404")) { PageNotFound model = new PageNotFound() { ErrorTitle = page.ErrorTitle, ErrorCode = page.ErrorCode, ErrorDescription = page.ErrorDescription }; return(PartialView(CONSTVALUE.PARTIAL_VIEW_ERROR_FOLDER + "_404.cshtml", model)); } return(PartialView("_Error")); }
public void SetNotFoundPage(PageNotFound pnf) { Config.SetNotFoundPage(pnf.ParentId, pnf.NotFoundPageId); DistributedCache.Instance.RefreshPageNotFoundConfig(pnf); }
public static void RefreshPageNotFoundConfig(this DistributedCache dc, PageNotFound pageNotFound) { dc.RefreshByPayload(new Guid(PageNotFoundManagerCacheRefresher.Id), pageNotFound); }