Add file upload functionality to your ASP.NET app, including real-time progress and server-side streaming.
Q: Can I change the look and feel of an Upload control or Progress Panel?
A: Yes! The Upload control exposes many Appearance properties that allow you to manipulate the look of the "browse" button and textbox. You can even use custom images so the Upload control can match your website design. The ProgressPanel can be extensively modified so that text, progress bars, and the cancel button are independently modified. At runtime you can even issue custom status messages so reporting progress to your end users is tailored to your application.
Back to Top
Q: Does File Upload use much server memory?
A: PowerWEB File Upload was designed to use very little server memory during a file upload operation. Typical HTTP file uploads using ASP.NET require the entire file get loaded into server memory before the page cycle is started. By default, File Upload is configured to stream files directly to disk, using only a small 50K memory buffer during the upload. However, if you choose to stream files to memory you can configure File Upload to do so. Using this method, you can periodically place uploaded bytes onto an open stream, effectively uploading file data from a client browser directly to a destination Stream object.
Back to Top
Q: I am using File Upload with my own custom HTTPModule and it no longer functions. Why is this?
A: In order to handle realtime upload progress as well as highly efficient streaming operations, PowerWEB File Upload uses an HttpModule to intercept file upload posts. This HttpModule must be registered first in your application's Web.Config file to allow it to handle file data before other modules interact with the HTTP Request. As long as the FileUploadModule is first in the list of registered HttpModules, your custom HttpModule should function properly and not interfere with the operation of File Upload.
Back to Top
Q: Is it possible to upload multiple files at the same time?
A: While PowerWEB File Upload allows for uploading multiple files, it is limited to posting one file at a time. While the product could have been designed to post files in parallel, the current web browser standards dictate that only two open connections should be maintained between a client and a server. File Upload uses one connection for uploading a file and another for polling the server for progress statistics.
Back to Top
Q: How do I handle exceptions that occur during a file upload, or during multiple file uploads?
A: Because of the asynchronous nature of uploading files with PowerWEB File Upload for ASP.NET, and because you may choose to continue with an upload process if one file within a group fails, exception handling is done through events on the UploadManager control.

The UploadManager control exposes a FileUploadFailed event that is fired once for each file that fails during an upload operation. The event has a single argument of type FileUploadExceptionEventArgs containing an FailedUpload field which describes the underlying exception as well as know details of the failed file.
Back to Top
Q: How do I prevent a browser timeout during large file uploads?

Browser request timeouts can be prevented by modifying your application's web.config httpRuntime node. Using the executionTimeout attribute, you can set the number of seconds your application will wait before assuming the request has failed.  The example below will allow requests lasting up to 30 minutes:
<httpRuntime executionTimeout="1800" />

Back to Top
Q: Why do I see an 'Attempting to deserialize an empty stream' exception when I build my VS.NET 2008 Website?
A: Websites create an App_Licenses.dll for component licensing which must be distributed with the application.  Due to an apparent VS.NET 2008 bug, this dll is faulty when created during compilation on a 64 bit Operating System.  To work-around the problem, the App_Licenses dll in the 2008 Website can be replaced. 

Options include:
a) Compile a 2005 WebSite on the same (licensed) machine using the same controls/components
b) Compile a 2005 or 2008 WebSite on a 32 bit OS machine, provided this machine is also licensed (Dart Developer licenses allow installation on up to two machines)

Replace the faulty App_Licenses.dll with the resulting dll from one of the options above, and the Website should build and deploy without issue.  Do not delete the new dll, or VS.NET will again create a new faulty one in its place.

Back to Top
Q: Can I use File Upload on secure areas of my website using SSL and authentication?

Yes, File Upload automatically supports operation under SSL with no configuration necessary.  If your website uses authentication, be sure to set the UploadType property of the UploadManager control to IFrame, since the Flash plug-in cannot send credentials during an upload operation.  A future release of Adobe's Flash plug-in may provide this functionality.

Back to Top