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 151:
Line 152:            var isOptionEditLinkVisible = false;
Line 153:            if ('@Html.Raw(Model.CatalogList.IsOptionEditLinkVisible)' == 'True') {
Line 154:                isOptionEditLinkVisible = true;
Line 155:            }

Source File: c:\ECommerce\Sites\WebSiteV2\Views\ProductGroup\ProductGroupPage.cshtml    Line: 153

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ASP.<>c__DisplayClassf.<Execute>b__9() in c:\ECommerce\Sites\WebSiteV2\Views\ProductGroup\ProductGroupPage.cshtml:153
   System.Web.WebPages.<>c__DisplayClassb.<RenderSection>b__9(TextWriter tw) +196
   System.Web.WebPages.WebPageExecutingBase.WriteTo(TextWriter writer, HelperResult content) +22
   ASP.<>c__DisplayClass16.<Execute>b__10() in c:\ECommerce\Sites\WebSiteV2\Views\Shared\ProductListTheme.cshtml:87
   System.Web.WebPages.<>c__DisplayClassb.<RenderSection>b__9(TextWriter tw) +196
   System.Web.WebPages.WebPageExecutingBase.WriteTo(TextWriter writer, HelperResult content) +22
   ASP._Page_Views_Shared_ProductListMasterTheme_cshtml.Execute() in c:\ECommerce\Sites\WebSiteV2\Views\Shared\ProductListMasterTheme.cshtml:285
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +219
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +75
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +121
   System.Web.WebPages.WebPageExecutingBase.WriteTo(TextWriter writer, HelperResult content) +22
   System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +110
   System.Web.WebPages.WebPageBase.PopContext() +204
   System.Web.WebPages.WebPageExecutingBase.WriteTo(TextWriter writer, HelperResult content) +22
   System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +110
   System.Web.WebPages.WebPageBase.PopContext() +204
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +302
   System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +30
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +453
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +453
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +453
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +453
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +453
   System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +187
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +30
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +9
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +9
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +365
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +44
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +481
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +231
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134


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