Persits Software, Inc. Knowledge Base Articles

Failed to reallocate memory for a memory file error

Problem Description

When using AspUpload's memory upload feature (Upload.Save is called without arguments), the following error may occur:

Persits.Upload.1 error '800a0041'
Failed to reallocate memory for a memory file.

Solution

Memory uploads should not be used when large files are expected to be uploaded, as the entire file is kept in the server's memory during the upload. If AspUpload fails to allocate sufficient memory to store the file(s) being uploaded, the error above occurs.

Regular uploads (Upload.Save is called with a path argument) should be used whenever possible, especially if the uploaded files exceed 10 MB or so.