'/' 應用程式中發生伺服器錯誤。

索引超出範圍。必須為非負數且小於集合的大小。
參數名稱: index

描述: 在執行目前 Web 要求的過程中發生未處理的例外狀況。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。

例外狀況詳細資訊: System.ArgumentOutOfRangeException: 索引超出範圍。必須為非負數且小於集合的大小。
參數名稱: index

原始程式錯誤:


行 1:  @using Newtonsoft.Json.Linq;
行 2:  @{
行 3:      ViewBag.Title = ViewBag.TVList[0].PNameZh.ToString() + "-" + ViewBag.TVList[0].NameZh.ToString();
行 4:      ViewBag.Des = ViewBag.TVList[0].IntroductionZh.ToString();
行 5:      ViewBag.ID = ViewBag.TVList[0].ID.ToString();

原始程式檔: \\Ap-data\apdata\web\www.saltymask.com\UnderWater30m\Views\TV\Detail.cshtml    行: 3

堆疊追蹤:


[ArgumentOutOfRangeException: 索引超出範圍。必須為非負數且小於集合的大小。
參數名稱: index]
   System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) +72
   System.Collections.Generic.List`1.get_Item(Int32 index) +14898063
   CallSite.Target(Closure , CallSite , Object , Int32 ) +91
   ASP._Page_Views_TV_Detail_cshtml.Execute() in \\Ap-data\apdata\web\www.saltymask.com\UnderWater30m\Views\TV\Detail.cshtml:3
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148
   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.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +88
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81
   System.Web.Mvc.Async.<>c__DisplayClass3_1.<BeginInvokeAction>b__5(IAsyncResult asyncResult) +188
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   System.Web.Mvc.<>c.<BeginExecuteCore>b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState) +26
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +39
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
   System.Web.Mvc.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) +40
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   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.4087.0