开发者

ASP.NET Publish error

I've got a web application running on VS 2010, sql server 2008 and Windows 7

It runs fine inside visual studio and on the asp.net development server.

When I click publish I get an exception thrown.

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: 

Is this a connection string problem? Or something else?

Here's my 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>

In the app, I'm using "DBConnectionString" which is just my local machine.

3005 An unhandled exception has occurred. 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

Full /MagazineFormatUpdater

C:\inetpub\wwwroot\MagazineFormatUpdater\ CHED-JE 6368

w3wp.exe IIS APPPOOL\ASP.NET v4.0 InvalidOperationException

The DataSet in data source 'objdatasource1' does not contain any tables. at

System.Web.UI.WebControls.FilteredDataSetHelper.GetDataTable(Control owner, Object dataObject) at System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) at System.Web.UI.WebControls.DataBoundControl.PerformSelect() at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Bool开发者_如何学Cean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

/MagazineFormatUpdater/default.aspx ::1 False IIS APPPOOL\ASP.NET v4.0 7 IIS APPPOOL\ASP.NET v4.0 False at System.Web.UI.WebControls.FilteredDataSetHelper.GetDataTable(Control owner, Object dataObject) at System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) at System.Web.UI.WebControls.DataBoundControl.PerformSelect() at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I'm taking from that that something is wrong with my IIS APPPOOL\ASP.NET v4.0 account and indeed I was getting a mssql error along with the above on my event viewer.

What I did was follow the directions at http://msdn.microsoft.com/en-us/library/dd483479.aspx pertaining to creating a grant script for that account and the sql error is gone. The problem is that the error posted above is still displaying. Any clue as to why?

I took a look in sql profiler and got the stored proc being executed

exec dbo.Starch_Display_Pivot @term=NULL

I run that inside SSMS and I get the expected rows but inside the published app, I'm getting no rows. Any ideas?


I found my solution. The exception of 'does not contain any tables' is slightly misleading. I copied my web application over and just made an empty web site. While debugging, I was able to recreate the exception I pointed out above but in the catch block, It stated that the login failed for my defaultappPool user. I followed the directions on here http://selfelected.blogspot.com/2009/10/login-failed-for-user-iis.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜