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 537:        //recombee_js+= "var client = new recombee.ApiClient('scg-cement-building-materials-solution', 'aWCPuCUV958bPakOcivYyU8VswhsBZUHnV8NPbS4efs8V6D8GhWd21T60v5xbzFc');";
Line 538:
Line 539:        recombee_js += "var itemId = '" + routeData_recom["id"].ToString() + "';";
Line 540:        recombee_js += "var targetUserId = '" + RecombeeId + "';";
Line 541:        recombee_js += "var count = 1;";

Source File: d:\inetpub\wwwroot\Themes\Scg\Views\footer.cshtml    Line: 539

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ASP._Page_Themes_Scg_Views_footer_cshtml.Execute() in d:\inetpub\wwwroot\Themes\Scg\Views\footer.cshtml:539
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +251
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +147
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +121
   System.Web.WebPages.<>c__DisplayClass3.<RenderPageCore>b__2(TextWriter writer) +308
   System.Web.WebPages.HelperResult.ToString() +85
   ASP._Page_Themes_Scg_Views_Layout_cshtml.Execute() in d:\inetpub\wwwroot\Themes\Scg\Views\Layout.cshtml:2019
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +251
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +147
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +121
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +135
   Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.Render(ShapeDescriptor shapeDescriptor, DisplayContext displayContext, HarvestShapeInfo harvestShapeInfo, HarvestShapeHit harvestShapeHit) in C:\Orchard-Off-The-Grid-Sample-Code-dev\Orchard-Off-The-Grid-Sample-Code-dev\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:151
   Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.<>c__DisplayClass20_7.<Discover>b__14(DisplayContext displayContext) in C:\Orchard-Off-The-Grid-Sample-Code-dev\Orchard-Off-The-Grid-Sample-Code-dev\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:133
   Orchard.DisplayManagement.Descriptors.<>c__DisplayClass7_1.<BoundAs>b__1(DisplayContext displayContext) in C:\Orchard-Off-The-Grid-Sample-Code-dev\Orchard-Off-The-Grid-Sample-Code-dev\src\Orchard\DisplayManagement\Descriptors\ShapeAlterationBuilder.cs:56
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in C:\Orchard-Off-The-Grid-Sample-Code-dev\Orchard-Off-The-Grid-Sample-Code-dev\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:203
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in C:\Orchard-Off-The-Grid-Sample-Code-dev\Orchard-Off-The-Grid-Sample-Code-dev\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:99
   Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in C:\Orchard-Off-The-Grid-Sample-Code-dev\Orchard-Off-The-Grid-Sample-Code-dev\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:86
   Orchard.DisplayManagement.Implementation.DisplayHelper.Invoke(String name, INamedEnumerable`1 parameters) in C:\Orchard-Off-The-Grid-Sample-Code-dev\Orchard-Off-The-Grid-Sample-Code-dev\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:44
   Orchard.DisplayManagement.Implementation.DisplayHelper.TryInvoke(InvokeBinder binder, Object[] args, Object& result) in C:\Orchard-Off-The-Grid-Sample-Code-dev\Orchard-Off-The-Grid-Sample-Code-dev\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:29
   CallSite.Target(Closure , CallSite , Object , Object ) +233
   Orchard.Mvc.ViewEngines.ThemeAwareness.<>c__DisplayClass9_0.<FindView>b__0(ViewContext viewContext, TextWriter writer, IViewDataContainer viewDataContainer) in C:\Orchard-Off-The-Grid-Sample-Code-dev\Orchard-Off-The-Grid-Sample-Code-dev\src\Orchard\Mvc\ViewEngines\ThemeAwareness\LayoutAwareViewEngine.cs:63
   Orchard.Mvc.ViewEngines.ThemeAwareness.LayoutView.Render(ViewContext viewContext, TextWriter writer) in C:\Orchard-Off-The-Grid-Sample-Code-dev\Orchard-Off-The-Grid-Sample-Code-dev\src\Orchard\Mvc\ViewEngines\ThemeAwareness\LayoutAwareViewEngine.cs:90
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +377
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +90
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +188
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +32
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +39
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +46
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) +83
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +29
   Orchard.Mvc.Routes.<<ProcessRequestAsync>b__0>d.MoveNext() in C:\Orchard-Off-The-Grid-Sample-Code-dev\Orchard-Off-The-Grid-Sample-Code-dev\src\Orchard\Mvc\Routes\ShellRoute.cs:174
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +29
   Orchard.Owin.<<UseOrchard>b__0_0>d.MoveNext() in C:\Orchard-Off-The-Grid-Sample-Code-dev\Orchard-Off-The-Grid-Sample-Code-dev\src\Orchard\Owin\OrchardMiddleware.cs:17
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +29
   Orchard.Mvc.Routes.<ProcessRequestAsync>d__5.MoveNext() in C:\Orchard-Off-The-Grid-Sample-Code-dev\Orchard-Off-The-Grid-Sample-Code-dev\src\Orchard\Mvc\Routes\ShellRoute.cs:181
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
   System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar) +65
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +431
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +158


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