【问题标题】:asp.net application while deploying in IIS7 server error - cannot find table 0在 IIS7 服务器中部署时的 asp.net 应用程序错误 - 找不到表 0
【发布时间】:2013-01-25 12:11:02
【问题描述】:

我尝试在 IIS 服务器 7 中部署 ASP.NET 应用程序。我使用的是 Windows 7。部署时出现错误“找不到表 0”。

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) +95
   LHS.RightColumn.Page_Load(Object sender, EventArgs e) in C:\Saravanan\Saravanan\Saravanan\LHS\LHS\RightColumn.ascx.cs:33
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

请帮我解决这个问题。 在 Visual Studio 中,此应用程序运行良好。 但在 IIS 中显示此错误。 请在这方面帮助我

【问题讨论】:

  • LHS.RightColumn.Page_Load(Object sender, EventArgs e) in C:\Saravanan\Saravanan\Saravanan\LHS\LHS\RightColumn.ascx.cs:33 ...第 33 行是什么?
  • @aquinas - 我敢打赌它是...tables[0]...,其中tablesDataTableCollection。问题是 - 这个集合是如何填充的?
  • 阿奎那:我也不知道这条路径是从哪里显示的。在错误消息中,它显示如下。但是我的系统中没有这样的路径
  • 奇怪的是 there is no path like this in the system 它一定是。正如错误所示。问题可能是您没有为您的应用程序提供正确的虚拟路径。

标签: asp.net iis-7


【解决方案1】:

几周前我遇到了这个错误,这是因为 web.config 文件不正确数据库信息无效。希望这会对您有所帮助。

【讨论】:

  • 我在 web.config 中给出了正确的数据库详细信息。我验证了,但仍然会出现同样的错误
猜你喜欢
  • 2023-03-17
  • 2020-05-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多