Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Configuration Problem - Element 'buildProviders' cannot be defined below the application level

Status
Not open for further replies.

SGLong

Programmer
Jun 6, 2000
405
US
I"m extremely frustrated. I've built a new website (VS 2010 - C#) and am trying to deploy it and I cannot get past the above error. I've Googled so many different posts and studied all of their suggested solutions. Some of them seem very straight-forward and others just don't give me enough step-by-step information to follow.

Here's a summary of what the error message I'm getting
Server Error in '/' Application.
Parser Error Message: The element 'buildProviders' cannot be defined below the application level
Source: ...\public_html\web-config Line: 49


Here's the directory structure of my website:
/ftp41059679-0/public_html [Where the Default.aspx and web.config files (among others) reside]
/ftp41059679-0/public_html/App_Code
/ftp41059679-0/public_html/bin
/ftp41059679-0/public_html/LogFiles
/ftp41059679-0/public_html/MemberPages
/ftp41059679-0/public_html/Reports
/ftp41059679-0/public_html/Scripts


Here's the directory structure of my VS project:
C:\...\MyRootFolder\ [Where the bulk of my aspx files reside]
C:\...\MyRootFolder\App_CodeC:\...\MyRootFolder\BinC:\...\MyRootFolder\LogFilesC:\...\MyRootFolder\MemberPagesC:\...\MyRootFolder\ReportsC:\...\MyRootFolder\scripts
Here's the web.config file. The offending line is highlighted in [highlight #FCE94F]yellow[/highlight]:
Code:
<?xml version="1.0" encoding="macintosh" ?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  [URL unfurl="true"]http://go.microsoft.com/fwlink/?LinkId=169433[/URL]
  -->
<configuration>
  <configSections>
    <sectionGroup name="businessObjects">
      <sectionGroup name="crystalReports">
        <section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null"/>
      </sectionGroup>
    </sectionGroup>
  </configSections>
  <appSettings>
    <add key="IsDevelopment"                  value="true"/>
    <add key="InMaintenanceMode"              value="false"/>
    <add key="BackOnLineMessage"              value="Please Check Back Later"/>
    <add key="DatabaseTimeOut"                value="60000"/>

[indent]Numerous other keys[/indent]

    <add key="TimeDelayInSeconds"             value="10"/>
    <add key="CrystalImageCleaner-AutoStart"  value="true"/>
    <add key="CrystalImageCleaner-Sleep"      value="60000"/>
    <add key="CrystalImageCleaner-Age"        value="120000"/>
  </appSettings>
  <system.web>
    <customErrors mode="Off"></customErrors>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
      <assemblies>
        <add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
        <add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
        <add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
        <add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
        <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Windows.Forms.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </assemblies>
      <buildProviders>
        [highlight #FCE94F]<add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>[/highlight]
      </buildProviders>
    </compilation>
    <httpHandlers>
      <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
    </httpHandlers>
  </system.web>
  <businessObjects>
    <crystalReports>
      <rptBuildProvider>
        <add embedRptInResource="true"/>
      </rptBuildProvider>
    </crystalReports>
  </businessObjects>
  <system.webServer>
    <handlers>
      <add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/>
    </handlers>
    <validation validateIntegratedModeConfiguration="false"/>
  </system.webServer>
</configuration>

The 'Virtual path' for my solution is defined as '\', which to my thinking is also 'MyRootFolder' shown above.

Can somebody PLEASE help me figure out what I'm doing wrong?

Steve
 
I never ran into this issue but it seems because the web is not at the root of iis you need to configure your web as an application in IIS:
that that error says is that element can only be present on the web.config placed on the top level folder of an application dir. in this case, i think that you have a sub directory with your site and this sub directory isn't configured in IIS as a web application. so, copying that line to the web.config file placed at the top folder or configuring IIS so that the sub directory is configure as an app should solve this.
[/quote
 
As far as I can tell, the web.config file is in the root folder - 'public_html' on the website and 'MyRootFolder' on my local machine. The .rpt files are in subfolders from there - 'public_html/Reports' and 'MyRootFolder\Reports'. It just doesn't make any sense to me.



 
Sorry I can't be of more help. I stopped using CR years ago. After VS stopped carrying it natively, I gave up on it.. Just had too many issues trying to deploy code.
You should look into moving your reports to SQL Server Reporting Services
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top