1197229 - Using reverse proxies with the Crystal Reports for .NET WebForm Viewer control

SAP Knowledge Base Article - Public

1197229 - Using reverse proxies with the Crystal Reports for .NET WebForm Viewer control

Symptom

A Visual Studio .NET ASP.NET web application uses the Crystal Reports for Visual Studio assemblies with the .NET 2.0 or above Framework. How are reverse proxies implemented in this environment?

Resolution

When used in reverse proxy environments, previous versions of Crystal Reports would exhibit issues such as logon prompts or communication errors when printing via the ActiveX print control. These issues were caused by the Crystal Reports runtime trying to access files in the crystalreportviewers12/13 virtual directory using a relative path to the root directory of the web site.

Updates included with Crystal Reports for Visual Studio allow for configuration of the crystalreportsviewers12/13 virtual directory as a subdirectory of the application's virtual directory using the application's web.config file.

The following steps will enable the Crystal Reports for VS Webforms viewer control to work in a Reverse Proxy environment:

  1. Copy the crystalreportviewers12/13 directory and its subdirectories to the root of your application directory. (The crystalreportviewers12/13 directory is located in the C:\inetpub\wwwroot\aspnet_client\system_web directory.)
  2. Open Internet Information Services Manager and navigate to the virtual directory for the application.
  3. Right click on the crystalreportviewersXX directory and choose "Properties".
  4. Click the "Create" button next to the Application field to create the application settings for the crystalreportviewersXX directory. Note: Replace the XX in crystalreportviewersXX with the number 12 or 13. 12 = CR 2008, 13 = CR for VS.
  5. Click the "OK" button to exit the Properties window.
  6. Add the following tags to the application web.config under the <configuration> tag at the top of the file:
 <configSections>
<sectionGroup name="businessObjects">
<sectionGroup name="crystalReports">
<section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null "/>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings>
<add key="CrystalImageCleaner-AutoStart" value="true" />
<add key="CrystalImageCleaner-Sleep" value="60000" />
<add key="CrystalImageCleaner-Age" value="120000" />
</appSettings>
<businessObjects>
<crystalReports>
<crystalReportViewer>
<add key="ResourceUri" value="~/crystalreportviewersXX" /> XX = version of Viewer - remove this from the file
</crystalReportViewer>
</crystalReports>
</businessObjects>

 

Keywords

reverse proxy net printing stopped crystalreportviewers115 activeX dmz url rewrite redirect nat network address translation firewall viewer webform asp.net aspnet communication port , 225538 , KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , How To

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio ; SAP Crystal Reports, version for Visual Studio .NET 2008