title: ASP.NET Publish error
body: <p>I've got a web application running on VS 2010, sql server 2008 and Windows 7</p>
  
  <p>It runs fine inside visual studio and on the asp.net development server. </p>
  
  <p>When I click publish I get an exception thrown. </p>
  
  <pre><code>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: 
  </code></pre>
  
  <p>Is this a connection string problem? Or something else? </p>
  
  <p>Here's my web.config </p>
  
  <pre><code>&lt;configuration&gt;
  &lt;connectionStrings&gt;
  &lt;remove name="DBConnectionString"/&gt;
  &lt;add name="DBConnectionString" connectionString="data source=cdstem; Initial Catalog=****; Integrated Security=SSPI;" /&gt;
  &lt;add name="****ConnectionString" connectionString="Data Source=.;Initial Catalog=****;Integrated Security=True"
    providerName="System.Data.SqlClient" /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>In the app, I'm using "DBConnectionString" which is just my local machine.  </p>
  
  <blockquote>
    <p>3005     An unhandled exception has occurred.     9/16/2011 1:51:41 PM
    9/16/2011 5:51:41 PM    6609e9834ab3483b8eff8edb3aa5269b    8    1<br>
    0   /LM/W3SVC/1/ROOT/MagazineFormatUpdater-3-129606690952604169<br>
    Full    /MagazineFormatUpdater<br>
    C:\inetpub\wwwroot\MagazineFormatUpdater\     CHED-JE    6368<br>
    w3wp.exe    IIS APPPOOL\ASP.NET v4.0    InvalidOperationException<br>
    The DataSet in data source 'objdatasource1' does not contain any
    tables. at<br>
    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)  </p>
    
    <blockquote>
      <p>/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)</p>
    </blockquote>
  </blockquote>
  
  <p>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.  </p>
  
  <p>What I did was follow the directions at <a href="http://msdn.microsoft.com/en-us/library/dd483479.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/dd483479.aspx</a>
  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? </p>
  
  <p>I took a look in sql profiler and got the stored proc being executed </p>
  
  <pre><code>exec dbo.Starch_Display_Pivot @term=NULL
  </code></pre>
  
  <p>I run that inside SSMS and I get the expected rows but inside the published app, I'm getting no rows.  Any ideas? </p>