Persits Software, Inc. Knowledge Base Articles

Request.BinaryRead Failed error

Problem Description

A call to Upload.Save , Upload.SaveVirtual or Upload.SaveToMemory generates the following error:

Persits.Upload.1 error '800a0001'
Request.BinaryRead Failed.

Solution

In most cases it means that your upload script uses Request.Form or Request.QueryString prior to calling Upload.Save XXX . As a result, the BinaryRead method of the Request object fails.

You must never use Request.Form in your upload script because the ENCTYPE="multipart/form-data" attribute of your form makes this collection unusable. Use Upload.Form instead. Remeber, however, that the Upload.Form collection is populated by a call to Upload.Save XXX , therefore you must not call Upload.Form prior to calling Save XXX .