Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 259
1.x, 2.x, 3.x
Does FileUp have Virus Protection?
Many companies wish to scan uploaded files for viruses. FileUp does not contain any inherent virus protection. However, it will work with any third party virus protection program. The only issue to be aware of is that virus scanners can lock files, which may impact the upload process. For instructions on compensating for virus scanning behavior, see below.

Please note FileUp caches the uploaded files out incrementally, into a temp directory specified with the "upl.Path" property, as they are received. Therefore, a file will not be able to be scanned before it is written to disk.

Any 3rd party virus scanner should scan the file right after it's written to disk. It should not have to wait for a user to run the scan--It should be automatic.

Most virus checkers, such as Norton AntiVirus, will verify all writes to the system hard disk. A good virus scanner will prevent all files containing viruses from being written to the hard disk. Since FileUp uses regular file system write calls, a virus scanner installed on the web server will detect any uploaded viruses.

Also, FileUp may throw an error if the file being uploaded is locked by the server side virus scanning software. That error could be something like:

SoftArtisans.SAFile.1 error '80020009'
Cannot create temporary file.


Error 80020009
Error occurred when moving cached file to final destination.

This happens because the Virus Protection software may lock the file during the scanning process and FileUp is NOT able to access it in order to successfully
  1. cache the file (as a temp file, something like "sa123.tmp") in a temp location on the server (specified in your "upl.path" statement), or
  2. delete the temp file from the cached location and resave in its final destination.

Locked File Retry Time Parameter

One thing that you must be aware of is that if you enable virus protection on the server, it will interfere with the upload process and you must make a slight adjustment in FileUp to allow for the locking that the virus protection will place on the file(s) as soon as they hit the server.

FileUp is frequently used to upload content to a virtual directory of a web site. Once the content has been requested via HTTP, IIS or some other process may lock the file containing the content. For example,

A user uploads a GIF file, and then immediately views the uploaded GIF in her browser. The user then tries to immediately upload a replacement GIF file. With versions 4 and later of IIS, this upload will fail.

These versions lock static content files (e.g., GIF, HTML) for as long as 30 seconds after they are requested by HTTP. Additionally, versions 4 and later of IIS will continue locking the content file for as long as there are outstanding requests to that file. A heavily requested file may stay locked for minutes or hours at a time.

Other processes on a web server, such as content indexing, backup utilities, or virus scanners, may also lock the files. FileUp will retry overwriting the locked file once per second for up to 45 seconds.

Via the Registry, it is possible to set the default number of seconds that FileUp will re-attempt overwriting the locked file.


LockedFileRetryTime sets the maximum of number of seconds to retry overwriting a locked file before failing.

References: Microsoft Knowledge Base articles Q191742 and Q182626.

Please note: Uploading files to a database blob will not be virus scanned.

A possible workaround would be to use FileUp to upload the files to a folder on the server (this will allow the file to be scanned for viruses) and then to use the integral FileManager component's "ExportToBlob" method to put it into the database.

ExportToBlob Method
Object:   FileManager
Syntax: ExportToBlob ([in] Source, [in] recordset("column-name"))
Description:   This method writes a Binary Large Object (BLOB) into a database from a source file in the specified location. The object is saved into the field specified in the column-name argument. The recordset argument must specify a valid ADO recordset.
Created : 1/15/2003 12:00:00 AM (last modified : 9/18/2003 11:48:11 AM)
Rate this article!