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

未将对象引用设置到对象的实例。

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

异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。

源错误:


行 30:             </li> 
行 31:         }*@
行 32:         @foreach (var item in bannBll.Fetch(0, "where islock=1 and ClassId=@0 and ver=@1", "SortId", 10, ver))
行 33:         {
行 34:             <li class="swiper-slide" mod-img="@item.ImgurlSmall" pc-img="@item.Imgurl">

源文件: d:\website\web2\website\View\map.cshtml    行: 32

堆栈跟踪:


[NullReferenceException: 未将对象引用设置到对象的实例。]
   CompiledRazorTemplates.Dynamic.RazorEngine_906af04aab014af5abeff82aeca4d5b7.Execute() in d:\website\web2\website\View\map.cshtml:32
   RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader, Boolean IsGlobal) +147
   RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag) +53
   RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) +39
   RazorEngine.Templating.DynamicWrapperService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) +57
   RazorEngine.Templating.<>c__DisplayClassa.<Run>b__9(TextWriter writer) +61
   RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) +59
   RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag) +115
   Smarta.BLL.HttpHandler.RazorHttpHandler.ProcessRequest(HttpContext context) +55
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +188
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +71


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