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 87:                 {
Line 88:                     _section = Module.SectionById(ItemId);
Line 89:                     SectionIndex = _section.IndexNumber;
Line 90:                         if(SectionIndex < 1) SectionIndex = 1;
Line 91:                 }

Source File: c:\Sites\mimsites\lungcancerpatient1\App_Code\Lcms\CmsContext.cs    Line: 89

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   CmsContext.get_Section() in c:\Sites\mimsites\lungcancerpatient1\App_Code\Lcms\CmsContext.cs:89
   LmsContext.get_lmsSection() in c:\Sites\mimsites\lungcancerpatient1\App_Code\Lcms\LmsContext.cs:59
   LmsContext.get_LmsSection() in c:\Sites\mimsites\lungcancerpatient1\App_Code\Lcms\LmsContext.cs:82
   ASP._Page_en_lc_view_cshtml.Execute() in c:\Sites\mimsites\lungcancerpatient1\en-lc\view.cshtml:100
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +251
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +98
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +181
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +106
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +141


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