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

Binary Storage Configuration

  • 3 minutes to read

This topic describes how DevExpress ASPxCapcha, WebChartControl, ASPxGauges and ASPxBinaryImage controls support the IIS clustered web environment (also known as Web Farms or Web Gardens).

Web farm and web garden technologies allow you to run a web application on several web servers (web farm) or on the same server but in different processes. Each process is 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.

Creating a Web garden for an application pool yields the following advantages.

  • Robust processing of requests: when a worker process in an application pool is tied up (for example, when a script engine stops responding), other worker processes can accept and process requests for the application pool.
  • Reduced competition for resources: when a Web garden reaches a steady state, each new TCP/IP connection is assigned, according to a round-robin scheme, to a worker process in the Web garden. This helps balance workloads and reduces competition for resources that are bound to a worker process.

With default settings, a binary storage mechanism would not work with Web Farms and Web Gardens for the enhanced transformation of a binary image from the specified binary storage to the client.

To use Web Farms and Web Gardens, modify the settings of the binary storage mechanism by using the control’s BinaryStorageMode property (ASPxBinaryImage.BinaryStorageMode, ASPxGaugeControl.BinaryStorageMode, CaptchaImageProperties.BinaryStorageMode, WebChartControl.BinaryStorageMode), the BinaryStorageConfigurator.Mode field, BinaryStorageConfigurator.RegisterCustomStorageStrategy and BinaryStorageConfigurator.RegisterStorageStrategy methods.

The BinaryStorageMode property provides the following modes.

Value Description
Default This mode implies using the Cache mode if another configuration is not defined by the BinaryStorageConfigurator.Mode field.
Session Binary data is stored within a session. Web Gardens and Web Farms can be used by the binary storage mechanism if an application session is configured using the SQL or State Server Session-State Modes.
Cache Binary data is stored within a cache. Web Gardens and Web Farms will not work correctly in this mode.
Custom Custom mode provides for implementing a custom scenario for storing and accessing binary data. Web Farms and Web Gardens should work if the custom configuration implements storing the binary data on the hard drive, or by using a web service. For more details, use the How to Define Custom Binary Storage Configuration Code Central example, which implements storing binary images on a hard drive.

Note

To specify the binary storage mode for DevExpress ASPxCapcha, ASPxCharts, ASPxGauges and ASPxBinaryImage controls simultaneously, define the BinaryStorageMode property within the global.asax file as shown below:

void Application_Start(object sender, EventArgs e) { DevExpress.Web.BinaryStorageConfigurator.Mode = DevExpress.Web.BinaryStorageMode.Session; }