Version

Image Deployment in WebGauge

WebGauge™ is unlike other web controls because in addition to generating HTML, it generates an image on the server upon every request. This image must be deployed in some way so that it is accessible in the client’s browser window.

Two options are provided through the DeploymentScenario property:

  • DeploymentScenario = Session: Gauge images are streamed through a page called GaugeImage.aspx which contains a single GaugeImagePipe control.

  • DeploymentScenario = FileSystem: Gauge images are saved as files on the file system.

The following sections provide more detailed descriptions of the above-mentioned scenarios:

Session-Based Deployment

After the browser requests the page with the gauge, the server will generate the gauge image and store it in the session state, along with a unique key to identify it.

The server will render an IMG element containing a link to the GaugeImagePipe page (typically named GaugeImage.aspx) with a QueryString. The QueryString contains the unique key to the gauge that has been stored in the session state. When the browser makes its request for that IMG element, the GaugeImagePipe page will load, sending the image to a stream. The image is then available for display in the client browser.

Session-base deployment can work in a load-balanced "web farm" environment, as long as session state is managed correctly in the application.

Note
Note:

If session state is set to "InProc," then this deployment scenario will not work across multiple web servers.

If the DeploymentScenario.Scenario property is set to Session, then the application must have an ASPX page containing a single GaugeImagePipe control. Typically this page will be named GaugeImage.aspx and it will be in the same folder as the web form containing the gauge. However, the name and location of this page can be customized using the ImagePipePageName property.

File System-Based Deployment

In file-system image deployment, an image is saved to the file system on the web server and a URL is generated to correspond to the image that was saved. If the DeploymentScenario.ImageURL property contains the token "#SEQNUM," then the gauge will save a finite number of images before the file name is reset. For example, if the ImageURL property is set to "Gauge_#SEQNUM(100).jpg", then files will be generated with names like "Gauge_1.jpg", "Gauge_2.jpg", …​ "Gauge_99.jpg", "Gauge_100.jpg", then back to "Gauge_1.jpg" again.

In this scenario, the user account under which the web application is running must have permission to write and modify files in the folder specified under the DeploymentScenario.FilePath property. By default, this user account is "ASPNET" in Windows® XP and "NETWORK SERVICE" in Windows Server 2003.