Symptom
Images and charts are replaced with a red X in the Visual Studio .NET webform DHTML viewer when viewed using IIS 7 on Windows Server 2008
Cause
- This happens because the application pool is being run in the Integrated Pipeline mode
- IIS 7 supports two modes
- Classic
- images and charts are managed using <httpHandlers>which are placed in the <system.web> section in the applications web.config file
- Integrated
- on IIS 7, the <system.webServer> section is used to define <handlers> for the crystalImageHandler
- This section may be missing if the application is being migrated from an earlier version of IIS.
- Classic
Resolution
If you have deployed your application to IIS 7 and see a red X in place of the report's image or chart, try one of the following:
A) Run the application pool in the "Classic" pipeline mode
- Ensure the crystalImageHandler is defined in the <system.web> section of the application's web.config file (in Classic mode the <system.webServer> section is ignored).
- Below is an example for a Crystal Reports 2008 web application:
<system.web>
<httpHandlers>
<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304"/>
</httpHandlers>
</system.web>
B) If you need to use the "Integrated" pipeline mode for your application pool
- Ensure that handlers are defined in the <system.webServer> section of your application's web.config file.
- Below is an example for a Crystal Reports 2008 web application:
<system.webServer>
<handlers>
<add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web,
Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/>
</handlers>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
Keywords
KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To