Server Error in '/' Application.

Cannot perform runtime binding on a null reference

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: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot perform runtime binding on a null reference

Source Error:


Line 191:        var textFolder = ContentHelper.TextFolder("CourseFolder");
Line 192:        var contentQuery = textFolder.CreateQuery();
Line 193:        contentQuery = contentQuery.WhereEquals("UserKey", ViewBag.courseAppointment.course);
Line 194:        return contentQuery.FirstOrDefault();
Line 195:    }

Source File: s:\HostingSpaces\bolonip\szenzor-metrologia.hu\wwwroot\Cms_Data\Sites\SzenzorMetrologia\Templates\Views\courseAppointment.Jelentkezes\template.cshtml    Line: 193

Stack Trace:


[RuntimeBinderException: Cannot perform runtime binding on a null reference]
   CallSite.Target(Closure , CallSite , Object ) +148
   System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +664
   CallSite.Target(Closure , CallSite , Object ) +264
   ASP._Page_Cms_Data_Sites_SzenzorMetrologia_Templates_Views_courseAppointment_Jelentkezes_template_cshtml.getTanfolyam() in s:\HostingSpaces\bolonip\szenzor-metrologia.hu\wwwroot\Cms_Data\Sites\SzenzorMetrologia\Templates\Views\courseAppointment.Jelentkezes\template.cshtml:193
   ASP._Page_Cms_Data_Sites_SzenzorMetrologia_Templates_Views_courseAppointment_Jelentkezes_template_cshtml.Execute() in s:\HostingSpaces\bolonip\szenzor-metrologia.hu\wwwroot\Cms_Data\Sites\SzenzorMetrologia\Templates\Views\courseAppointment.Jelentkezes\template.cshtml:32
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +138
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122
   Kooboo.CMS.Sites.View.FrontHtmlHelper.RenderViewInternal(HtmlHelper htmlHelper, String viewPath, ViewDataDictionary viewData, Object model) +338
   Kooboo.CMS.Sites.View.FrontHtmlHelper.RenderView(String viewName, ViewDataDictionary viewData, Boolean executeDataRule) +480
   Kooboo.CMS.Sites.View.FrontHtmlHelper.RenderView(ViewPosition viewPosition) +234
   Kooboo.CMS.Sites.View.<RenderPositionContents>d__7.MoveNext() +590
   System.Linq.Buffer`1..ctor(IEnumerable`1 source) +158
   System.Linq.Enumerable.ToArray(IEnumerable`1 source) +93
   Kooboo.CMS.Sites.View.FrontHtmlHelper.Position(String positionID, String defaultContent) +270
   ASP._Page_Cms_Data_Sites_SzenzorMetrologia_Templates_Layouts_MasterInner_template_cshtml.Execute() in s:\HostingSpaces\bolonip\szenzor-metrologia.hu\wwwroot\Cms_Data\Sites\SzenzorMetrologia\Templates\Layouts\MasterInner\template.cshtml:114
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +138
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +378
   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +31
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +659
   System.Web.Mvc.Controller.ExecuteCore() +146
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +91
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +60
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +25
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +60
   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.4682.0