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 688:    //string mainContentClass = "col";
Line 689:    string mainContentClass = "col";
Line 690:    if (Model.Item.GetBoolean("SideNavVisible") || (Model.Item.GetUsers("Contact") != null && Model.Item.GetUsers("Contact").Any())) {
Line 691:        mainContentClass += " col-md-8";
Line 692:    }

Source File: D:\dynamicweb.net\Solutions\Skabertrang\fsr.cloud.dynamicweb-cms.com\files\Templates\Designs\Web2020\_parsed\Page.parsed.cshtml    Line: 690

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   CompiledRazorTemplates.Dynamic.RazorEngine_288fb89600ca46f59f61ecd0eb808cb8.Execute() in D:\dynamicweb.net\Solutions\Skabertrang\fsr.cloud.dynamicweb-cms.com\files\Templates\Designs\Web2020\_parsed\Page.parsed.cshtml:690
   RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) +211
   RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) +88
   RazorEngine.Templating.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) +99
   RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) +68
   Dynamicweb.Rendering.Template.RenderRazorTemplate() +3502
   Dynamicweb.Rendering.Template.Output() +397
   Dynamicweb.Frontend.PageView.Output() +1386
   Dynamicweb.Frontend.DynamicwebHttpHandler.ProcessRequest(HttpContext context) +149
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +542
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +93


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