Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 9:      Layout = "/Areas/News/Views/Shared/NewsLayout.cshtml";
Line 10:     PageSettings pageSettings = new PageSettings(ABSOneDomain.Helpers.References.NewsHomeSettingsPathId, ABSOneDomain.Helpers.References.SettingsHomepageTemplateId);
Line 11:     Settings settings = pageSettings.GetPageSettings("NEWSHOMESETTINGS");
Line 12: 
Line 13: }

Source File: f:\approot\Areas\News\Views\Error\NewsErrorPage.cshtml    Line: 11

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ABSOneDomain.Helpers.SearchHelper.GetNewsSearchContext() +62
   SitecoreABSCBN.Areas.News.Controllers.PageSettings.GetPageSettings(String CacheKey) +688
   ASP._Page_Areas_News_Views_Error_NewsErrorPage_cshtml.Execute() in f:\approot\Areas\News\Views\Error\NewsErrorPage.cshtml:11
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +279
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +102
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +172
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +146
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +222

[InvalidOperationException: Error while rendering view: '/Areas/News/Views/Error/NewsErrorPage.cshtml' (model: 'Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc').
]
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +784
   Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args) +27
   Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args) +62
   (Object , Object[] ) +83
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +191
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +186
   Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.PerformRendering.Render(String placeholderName, TextWriter writer, RenderPlaceholderArgs args) +192
   (Object , Object[] ) +83
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +191
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +186
   Sitecore.Mvc.Helpers.SitecoreHelper.Placeholder(String placeholderName) +291
   ASP._Page_Areas_News_Views_Shared_NewsPlaceholder_cshtml.Execute() in f:\approot\Areas\News\Views\Shared\NewsPlaceholder.cshtml:6
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +103
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +173
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +147
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +223

[InvalidOperationException: Error while rendering view: '/Areas/News/Views/Shared/NewsPlaceholder.cshtml' (model: 'Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc').
]
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +784
   Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args) +27
   Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args) +62
   (Object , Object[] ) +83
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +191
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +186
   Sitecore.Mvc.Presentation.RenderingView.Render(ViewContext viewContext, TextWriter writer) +294
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380
   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +33
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +403