“/”应用程序中的服务器错误。

无法对 null 引用执行运行时绑定

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 无法对 null 引用执行运行时绑定

源错误:


行 7:                  <div class="newsdetail04">
行 8:                      <div class="dttop04 clearfix">
行 9:                          <h4 class="dttitle04 canedit">@Model.Title</h4>
行 10:                         <span class="canedit">@Model.AddTime.ToString("yyyy.MM.dd") &nbsp; @Model.Form</span>
行 11:                         <div class="bdsharebuttonbox">

源文件: e:\WebSite\huangyuyuan20170927\View\detail.cshtml    行: 9

堆栈跟踪:


[RuntimeBinderException: 无法对 null 引用执行运行时绑定]
   CallSite.Target(Closure , CallSite , Object ) +119
   System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +735
   CallSite.Target(Closure , CallSite , Object ) +164
   CompiledRazorTemplates.Dynamic.RazorEngine_05e29efde0a740928ac81a0df6965844.Execute() in e:\WebSite\huangyuyuan20170927\View\detail.cshtml:9
   RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader, Boolean IsGlobal) in e:\Work\H-万博manbetx网址(高中)\RazorEngine\Templating\TemplateBase.cs:232
   RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag) in e:\Work\H-万博manbetx网址(高中)\RazorEngine\Templating\RazorEngineCore.cs:155
   RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) in e:\Work\H-万博manbetx网址(高中)\RazorEngine\Templating\RazorEngineService.cs:262
   RazorEngine.Templating.DynamicWrapperService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) in e:\Work\H-万博manbetx网址(高中)\RazorEngine\Templating\DynamicWrapperService.cs:116
   RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) in e:\Work\H-万博manbetx网址(高中)\RazorEngine\Templating\RazorEngineServiceExtensions.cs:340
   RazorEngine.Templating.<>c__DisplayClassa.<Run>b__9(TextWriter writer) in e:\Work\H-万博manbetx网址(高中)\RazorEngine\Templating\RazorEngineServiceExtensions.cs:371
   RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) in e:\Work\H-万博manbetx网址(高中)\RazorEngine\Templating\RazorEngineServiceExtensions.cs:222
   RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag) in e:\Work\H-万博manbetx网址(高中)\RazorEngine\Templating\RazorEngineServiceExtensions.cs:371
   Smarta.BLL.HttpHandler.RazorHttpHandler.ProcessRequest(HttpContext context) +148
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +188
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.6.1099.0