繁体   English   中英

ASP.NET发布错误

[英]ASP.NET Publish error

我有一个在VS 2010,SQL Server 2008和Windows 7上运行的Web应用程序

它可以在Visual Studio内和asp.net开发服务器上正常运行。

当我单击发布时,会引发异常。

The DataSet in data source 'objdatasource1' does not contain any tables. 
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.InvalidOperationException: The DataSet in data   source 'objdatasource1' does not contain any tables.

Source Error: 

这是连接字符串问题吗? 或者是其他东西?

这是我的web.config

<configuration>
<connectionStrings>
<remove name="DBConnectionString"/>
<add name="DBConnectionString" connectionString="data source=cdstem; Initial Catalog=****; Integrated Security=SSPI;" />
<add name="****ConnectionString" connectionString="Data Source=.;Initial Catalog=****;Integrated Security=True"
  providerName="System.Data.SqlClient" />
</connectionStrings>

在应用程序中,我正在使用“ DBConnectionString”,它只是我的本地计算机。

3005发生未处理的异常。 9/16/2011 1:51:41 PM 9/16/2011 5:51:41 PM 6609e9834ab3483b8eff8edb3aa5269b 8 1
0 / LM / W3SVC / 1 / ROOT / MagazineFormatUpdater-3-129606690952604169
完整的/ MagazineFormatUpdater
C:\\ inetpub \\ wwwroot \\ MagazineFormatUpdater \\ CHED-JE 6368
w3wp.exe IIS APPPOOL \\ ASP.NET v4.0 InvalidOperationException
数据源'objdatasource1'中的DataSet不包含任何表。
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,DataSourceSelectArguments arguments,DataSourceViewSelectCallback回调的System.Web.UI.WebControls.FilteredDataSetHelper.GetDataTable(控件所有者,Object dataObject) )的System.Web.UI.WebControls.DataBoundControl.PerformSelect()的System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()的System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()的System.Web.UI。 System.Web.UI.Control.PreRenderRecursiveInternal()的System.Web.UI.Control.PreRenderRecursiveInternal()的System.Web.UI.Control.PreRenderRecursiveInternal()的System.Web.UI.Control的Control.EnsureChildControls()。 ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint)

/MagazineFormatUpdater/default.aspx :: 1 False IIS APPPOOL \\ ASP.NET v4.0 7 IIS APPPOOL \\ ASP.NET v4.0 System.Web.UI.WebControls.FilteredDataSetHelper.GetDataTable(控件所有者,对象dataObject)处为False System.Web的System.Web.UI.WebControls.DataBoundControl.PerformSelect()的System.Web.UI.DataSourceView.Select(DataSourceSelectArguments参数,DataSourceViewSelectCallback回调)处的System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments参数) System的System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()的System.Web.UI.Control.EnsureChildControls()的System.Web.UI.Control.PreRenderRecursiveInternal()的.UI.WebControls.BaseDataBoundControl.EnsureDataBound() System.Web.UI.Control.PreRenderRecursiveInternal()的System.Web.UI.Page.ProcessRequestMain处的.Web.UI.Control.PreRenderRecursiveInternal()(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint)

我从中发现IIS APPPOOL \\ ASP.NET v4.0帐户出了点问题,而实际上我在事件查看器中收到了mssql错误以及上述错误。

我所做的就是遵循http://msdn.microsoft.com/zh-cn/library/dd483479.aspx上有关为该帐户创建授权脚本的指示,并且sql错误消失了。 问题是上面显示的错误仍在显示。 为什么有任何线索?

我在sql探查器中查看了一下,发现存储的proc正在执行

exec dbo.Starch_Display_Pivot @term=NULL

我在SSMS中运行该行,得到了预期的行,但是在已发布的应用程序中,没有行。 有任何想法吗?

我找到了解决方案。 “不包含任何表”的例外会引起误解。 我复制了我的Web应用程序,并制作了一个空网站。 在调试时,我能够重新创建上面指出的异常,但是在catch块中,它表示我的defaultappPool用户登录失败。 我按照此处的说明http://selfelected.blogspot.com/2009/10/login-failed-for-user-iis.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM