Skip to main content
A newer version of this page is available. .

Web Farms and Web Garden Support

  • 5 minutes to read

This document describes how to make web applications that use the ASP.NET Document Viewer and HTML5 Document Viewer work properly in a clustered web environment (also known as Web Farms or Web Garden).

Web farms and web garden technologies allow you to run a web application on several web servers (web farms), or on the same server but in different processes, each process executed using its own processor (web garden). This is specified by the Internet Information Services (IIS) settings of the server host on which you deploy your web application.

By using a clustered environment, you can significantly improve the performance of large web applications. This, however, requires that XtraReports share its data between multiple processes/servers when a report is generated, printed or exported.

HTML5 Document Viewer and Report Designer’s Preview

If you use the HTML5 Document Viewer to display reports, do the following to adjust your Web reporting application to properly operate in web farms and the web garden:

ASP.NET Document Viewer

The ASPxDocumentViewer control introduces the FileStore design-time property to adjust your web application to properly operate in web farms and web garden.

WebReportingSpecifics_WebFarms1

The FileStore property provides the following settings:

Name

Description

Directory

Specifies the path to the directory, where XtraReports can store temporary files during report document generation. Note that this property can be set to either an absolute or a relative path.

By default it is set to ~/App_Data/XtraReports/FileStore.

KeepInterval

Specifies the amount of time (in milliseconds), to store temporary files after their creation.

By default it is set to 120000.

CheckInterval

Specifies the time interval between two sequential checks of the Directory for the files whose lifetime is greater than the KeepInterval, and which should be removed.

By default it is set to 60000.

If these properties are set to their default values, they are not serialized to the Web.config file. Therefore, if some or all these properties are set to a non-default value for any ReportViewer control in a project, they are added to the appSettings section of the Web.config file.

<appSettings>
    <add key="XtraReportsFileStore-Directory" value="~/MyFileStore" />
    <add key="XtraReportsFileStore-CheckInterval" value="100000" />
    <add key="XtraReportsFileStore-KeepInterval" value="200000" />
</appSettings>

Note

The ReportViewer.FileStore property is available only at design time within Visual Studio. So, it can’t be set via code, and instead, you can manually add these settings to the appSettings section of the Web.config file.

IMPORTANT:

The directory specified by the FileStore.Directory property (or the XtraReportsFileStore-Directory key) should grant read and write permissions to the ASP.NET worker processes in your clustered environment. This process’s user is called ASPNET in IIS 5.0 (Windows XP) or NETWORK_SERVICE in IIS 6.0 (Windows Server 2003) and IIS 7.0 (Windows Vista) or higher. There are some specifics when using this directory in web garden and web farms:

  • Web Garden.

    Naturally, it is necessary to give read/write permissions to the ASP.NET worker process only to the “~/App_Data/“ directory (in case you don’t change the default value of the FileStore.Directory property). So, XtraReports will create the “~/App_Data/XtraReports/FileStore” directory when necessary. However, if you don’t want the ASP.NET worker process to have read/write access to the entire “~/App_Data/“ directory, you can manually create the directory for a file store (e.g. “~/App_Data/XtraReports/FileStore”) and give read/write permissions only for this directory.

  • Web Farms.

    In case of multiple servers in a web farm, it is necessary that the FileStore‘s directory should be created on a server, which can be accessed by other servers in this farm. So, you first need to create a shared directory on a shared server, and then give read/write permissions for it to the ASP.NET worker processes of all web servers in a farm.

Note

Note that if the path specified by the FileStore.Directory property (or the XtraReportsFileStore-Directory key) isn’t found by XtraReports, or the ASP.NET worker process doesn’t succeed in writing temporary data into it, XtraReports tries to use the path returned by the CodegenDir property instead. In most situations, this approach works fine. However, use of this path is denied in the Medium Trust environment.

See Also