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 97: 
Line 98:     </script>*@
Line 99:     @Html.Partial((string)ViewBag.Page + ":Header")
Line 100:    @*<title>@ViewBag.Title</title>*@
Line 101:

Source File: c:\inetpub\wwwroot\Views\Shared\_MainView.cshtml    Line: 99

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ___Inventory_Items.MCH.CMS.Script.Inventory.Items.GetLineItem__StackCheck(Int32 itemID, Double qty, String currencyCode, String languageCode, String countryCode, String distributorID, Int32 storeID) +1217
   ___Inventory_Items.MCH.CMS.Script.Inventory.Items.GetLineItem(Int32 itemID, Double qty, String currencyCode, String languageCode, String countryCode, String distributorID, Int32 storeID) +109
   ___Inventory_Items.MCH.CMS.Script.Inventory.Items.__Invoke(Int32 methodID, Object[] parms) +3278
   BridgeAdapter.Scripts.ScriptExecute.InvokeScript_P(String scriptName, String method, SAssembly typ, BAdapter adapter, ConstantCollection constants) +589
   BridgeAdapter.Scripts.ScriptAdapter.RunScript(String scriptName, Dictionary`2 vars) +369
   BridgeAdapter.CMS.CMS.BuildCommandDataSource(ProcessWidgetHelper hlpr, PropertyCollection properties, HTMLElement htmlEl, String masterPrefix, ReaderCollection readers, TotalCollection totals, ConstantCollection constants, PagerCollection pagers, WidgetFolder root) +861
   BridgeAdapter.CMS.CMS.BuildDataSource(ProcessWidgetHelper hlpr, HTMLElement htmlEl, String masterPrefix, ReaderCollection readers, TotalCollection totals, ConstantCollection constants, PagerCollection pagers, WidgetFolder root) +639
   BridgeAdapter.CMS.CMS.ProcessBlock(ProcessWidgetHelper hlpr, String blockName, HTMLElement htmlEl, Boolean inTable, String masterPrefix, ReaderCollection readers, TotalCollection totals, ConstantCollection constants, PagerCollection pagers, WidgetFolder root, List`1 widgetNames) +1231
   BridgeAdapter.CMS.CMS.ReplaceInnerText(ProcessWidgetHelper hlpr, HTMLElement htmlEl, Boolean inTable, String masterPrefix, ReaderCollection readers, TotalCollection totals, ConstantCollection constants, PagerCollection pagers, WidgetFolder root) +975
   BridgeAdapter.CMS.CMS.ProcessWidget(Widget widget, HTTPAction action, ConstantCollection constants, String masterOutline) +1299
   MyCompanyHubMVC.Classes.MyView.Render(ViewContext viewContext, TextWriter writer) +1452
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +136
   ASP._Page_Views_Shared__MainView_cshtml.Execute() in c:\inetpub\wwwroot\Views\Shared\_MainView.cshtml:99
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +147
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +86
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +375
   System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +31
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +436
   System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +187
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +27
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +41
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +602
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +128


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