Server Error in '/' Application.
Cannot find table 0.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IndexOutOfRangeException: Cannot find table 0.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[IndexOutOfRangeException: Cannot find table 0.]
System.Data.DataTableCollection.get_Item(Int32 index) +6329986
Service2013_2.utilities.bll.download.GetOsList(String lang_id, String l1_id, String l2_id, String model) +155
Service2013_2.uc_2.download.mainzone_Download.Bind_OS() +342
Service2013_2.uc_2.download.mainzone_Download.Page_Load(Object sender, EventArgs e) +446
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
Service2013_2.utilities.mycontrols.MyUserControl_ProdInfo_download.OnLoad(EventArgs e) +16
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1016
先翻譯一下
<pre class="c" name="code">
' /'應用程序中的服務器錯誤。
無法找到表0 。
說明:執行當前Web請求期間,出現未處理的異常。請檢查堆棧跟踪有關錯誤的更多信息,以及它起源於代碼。
異常詳細信息: System.IndexOutOfRangeException :無法找到表0 。
源錯誤:
執行當前Web請求期間生成了未處理的異常。可以使用下面的異常堆棧跟踪信息確定有關異常原因和發生位置的信息。
堆棧跟踪:
[ IndexOutOfRangeException :無法找到表0 。 ]
System.Data.DataTableCollection.get_Item ( INT32指數) 6329986
Service2013_2.utilities.bll.download.GetOsList (語言ID字符串,弦樂l1_id ,弦樂l2_id ,弦模型) +155
Service2013_2.uc_2.download.mainzone_Download.Bind_OS ( +342 )
Service2013_2.uc_2.download.mainzone_Download.Page_Load (對象發件人,EventArgs E) +446
錯誤幫助( IntPtr的FP ,對象,對象T, EventArgs五)+25
Service2013_2.utilities.mycontrols.MyUserControl_ProdInfo_download.OnLoad ( EventArgs五) +16
System.Web.UI.Control.LoadRecursive ( 71 )
System.Web.UI.Control.LoadRecursive ( 190 )
System.Web.UI.Page.ProcessRequestMain (布爾includeStagesBeforeAsyncPoint布爾includeStagesAfterAsyncPoint ) 3064
版本信息:微軟NET Framework版本: 4.0.30319 ; ASP.NET版本: 4.0.30319.1016
我不了解ASP.NET,幫你找一下
Server error in application - cannot find table 0
他的解決方法(GOOGLE翻譯)
<pre class="c" name="code">
我現在能夠成功地運行應用程序。我做了以下:
1.創建新登錄“IIS APPPOOL\左”在SQL SERVER
2.創建一個文件夾命名“TempImageFiles”在C:那麼這個成功運行
其他資源請點這裡
希望有幫助到你
star7提到:
IndexOutOfRangeException: Cannot find table 0
我想你應該已經知道問題在哪, 基本上這是因為你的DataSet是空的. 當然不會有Tables[0], 所以Index就Out of Range了.