Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

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

Source Error:


Line 71:         News news = News.GetById(newsId, countUpViews: true);
Line 72: 
Line 73:         litHeadline.Text = news.Headline;
Line 74:         litTeaser.Text = news.Teaser;
Line 75:         litText.Text = news.Text;

Source File: d:\web\ringkoebing-rideklub.dk\www\UserControls\Frontend\NewsView.ascx.cs    Line: 73

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   UserControls_Frontend_ContentModules_View_NewsView.Page_PreRender(Object sender, EventArgs e) in d:\web\ringkoebing-rideklub.dk\www\UserControls\Frontend\NewsView.ascx.cs:73
   System.Web.UI.Control.OnPreRender(EventArgs e) +11754059
   System.Web.UI.Control.PreRenderRecursiveInternal() +131
   System.Web.UI.Control.PreRenderRecursiveInternal() +226
   System.Web.UI.Control.PreRenderRecursiveInternal() +226
   System.Web.UI.Control.PreRenderRecursiveInternal() +226
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3999


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