Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 513
Product
FileUp
Title
Server-Side Progress Indicator jumps from 0% to 100%, failing to show continual progress.
Problem
The Progess Indicator opens, but fails to show continuous progress. It refreshes only upon completion of the upload.
Solution

If this behavior occurs, check the following settings.

  1. Server side script debugging should be disabled in IIS.
  2. The Progress Indicator page needs a directive that will set 'EnableSessionState' to 'false'.
Server Side Script Debugging

When server side script debugging is enabled, this forces ASP to run in single-threaded mode, serializing all requests to the entire application. Therefore not only will the progress page not work correctly, but other users might have to wait to browse the site while the upload is in progress.

To check this setting: (Directions assume IIS 5)

  1. Open IIS, right click on your application directory and choose Properties.
  2. Click on the Virtual Directory tab.
  3. In the Application Settings section, click on the Configuration button.
  4. In the Application Configuration dialog, click on the App Debugging tab.
  5. In the Debugging Flag section, ensure that "Enable ASP server-side script debugging" is not checked.
Note: This can only be set on a directory marked as an Application. If your application directories are nested, the settings furthest from the root of the website take priority over that application's scripts.

'EnableSessionState' Directive

The Progress Indicator needs to operate outside of the current session in order to refresh properly. In order to maintain session state, ASP must serialize all requests for that session. To allow the progress indicator to execute outside of a session, the following directive must be added to the progress indicator page:

<%@ENABLESESSIONSTATE = False %>

Setting the ENABLESESSIONSTATE directive to "false" allows the Progress Indicator page's request to be processed on a separate thread. This allows the progress indicator to update itself while the upload continues to be processed on another thread. If this directive is not set, or is set to "true", then the progress indicator is queued until the upload finishes. At this point, the progress indicator can now be updated, but the upload is complete, so the indicator jumps immediately from 0% to 100%

The upload form and processing page can participate in the session as usual.

A Note on Testing Environments:

If testing the Progress Indicator by launching the browser on the same machine as the webserver, it may be necessary to create obstacles to slow the upload process so that the progress indicator will be able to show gradual upload progress. This can be done using very large files, or if the webserver is behind a proxy server, browser settings can be changed so that all traffic will be routed through the proxy, regardless of the local address. To do this in Internet Explorer:

  1. Choose "Tools"..."Internet Options".
  2. Click on the "Connections" tab.
  3. Click on the "LAN Settings" button.
  4. Uncheck "Bypass proxy server for local connections."
  5. Click OK to exit dialogs.
After changing this setting, any addresses referencing "localhost" will fail to be resolved. These addresses must be changed to reference the actual name of the server.

Another option for altering the progress indicator display while testing in a high speed environment is to decrease the interval at which the Progress Indicator page will refresh. This is done by altering the Meta tag that sets the refresh rate for the page. The sample code distributed with FileUp sets the Content value to "1", but for testing purposes, this can be set much lower.

<Meta HTTP-EQUIV=""Refresh"" CONTENT=.2>

It is not advisable to set the refresh rate to a very low value in code that is available for public consumption, as it may significantly affect performance on slower connections.

Created : 6/27/2003 12:08:25 PM (last modified : 6/27/2003 12:08:21 PM)
Rate this article!
Comments