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

在位置 0 处没有任何行。

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

异常详细信息: System.IndexOutOfRangeException: 在位置 0 处没有任何行。

源错误:


行 60:                 @{
行 61:                     System.Data.DataTable tmp = Model;
行 62:                     System.Data.DataRow r = tmp.Rows[0]; 
行 63:                 }
行 64:                 <div style="width: 90%; margin: auto; line-height: 25px; color: Black;">

源文件: d:\QC\qc\TestNewQC\NewQC\Views\FocusNews\FocusNewsDetile.cshtml    行: 62

堆栈跟踪:


[IndexOutOfRangeException: 在位置 0 处没有任何行。]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +2428913
   System.Data.DataRowCollection.get_Item(Int32 index) +19
   ASP._Page_Views_FocusNews_FocusNewsDetile_cshtml.Execute() in d:\QC\qc\TestNewQC\NewQC\Views\FocusNews\FocusNewsDetile.cshtml:62
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +123
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +86
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +375
   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +31
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +436
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +436
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +658
   System.Web.Mvc.Controller.ExecuteCore() +143
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +91
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +57
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +25
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +36
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +602
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +128


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