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 6:  @model Cds.Mktg.Press.Feature.News.Models.LatestNewsHeroRenderingModel
Line 7:  @{
Line 8:      var learnMoreAriaLabel = $"({Html.Sitecore().Dictionary("/News/ReadMore", "Read more")}) ({Model.TopNews.NewsHeadline})";
Line 9:      var backgroundImage = (!string.IsNullOrEmpty(Model.BackgroundImageUrl)) ? "background-image: url(" + Model.BackgroundImageUrl + ");" : "";
Line 10: }

Source File: C:\home\site\wwwroot\Views\Press\LatestNewsHero\LatestNewsHero.cshtml    Line: 8

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ASP._Page_Views_Press_LatestNewsHero_LatestNewsHero_cshtml.Execute() in C:\home\site\wwwroot\Views\Press\LatestNewsHero\LatestNewsHero.cshtml:8
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +251
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +147
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +121
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +377
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +90
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +793
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +793
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +698


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4690.0