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

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

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

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

源错误:


行 212:            @{
行 213:                var LinenavList4 = Entity.Linenav.ToList("LineType=" + 14977133330018020);
行 214:                IList<Linenav> ztLinenavList = LinenavList4.Where(n => Line.LineType.IndexOf(n.ID.ToString()) != -1).ToList();
行 215:                IList<Lineextens> LineextensList = Entity.Lineextens.ToList("ProductID=" + Line.ID);
行 216:                Lineextend Lineextend = Entity.Lineextend.Get(Line.ID);

源文件: d:\website\componet\Tourism\Areas\PC\product\xianlu\print.cshtml    行: 214

堆栈跟踪:


[NullReferenceException: 未将对象引用设置到对象的实例。]
   ASP.<>c__DisplayClass16.<Execute>b__12(Linenav n) in d:\website\componet\Tourism\Areas\PC\product\xianlu\print.cshtml:214
   System.Linq.WhereListIterator`1.MoveNext() +78
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +435
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +69
   ASP._Page_Componet_Tourism_areas_pc_product_xianlu_print_cshtml.Execute() in d:\website\componet\Tourism\Areas\PC\product\xianlu\print.cshtml:214
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +251
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +147
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +106
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +374
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +87
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +831
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +831
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +185
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +59
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +67
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +73
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +59
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +43
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +67
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +607
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134


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