Solved

ASPUpload: Request.BinaryRead failed (Large Files)

Posted on 2003-11-26
13
3,745 Views
Last Modified: 2009-01-19
I use the ASPUpload component to upload PDF files.  All seems to work fine until it is a large file (> 2 MB) that the user is trying to upload, which returns the error:

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

I've looked into the support articles about using Request.Form and such, but they don't seem to apply to this problem.  Also, why would this only occur with larger files?

Here's the code (which is all on one page):

<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="addnew2.asp">
<INPUT TYPE="FILE" SIZE="40" NAME="FILE1">
  <input name="Uploaded" type="hidden" id="Uploaded" value="true">
  <BR>
<INPUT TYPE=SUBMIT VALUE="Upload">
</FORM>

<%
Set Upload = Server.CreateObject("Persits.Upload")
Count = Upload.Save("d:\inetpub\probelaw\WWWROOT\DOCUMENTS")
Response.Write Count & " file(s) uploaded to d:\inetpub\probelaw\WWWROOT\DOCUMENTS"
For Each File in Upload.Files
File.Move "d:\inetpub\probelaw\WWWROOT\DOCUMENTS\" & (rsNewDocument.Fields.Item("JDocument_ID").Value) & ".pdf"
Next
%>
0
Comment
Question by:probelaw
  • 3
  • 2
  • 2
  • +4
13 Comments
 
LVL 58

Expert Comment

by:Gary
Comment Utility
Are you using Win 2003?  If so there is a default file upload size limit, but you can change it.
0
 
LVL 58

Expert Comment

by:Gary
Comment Utility
0
 

Author Comment

by:probelaw
Comment Utility
No...it's Win2k
0
 
LVL 1

Expert Comment

by:lowRider
Comment Utility
Your page is timing out.

Try putting this at the top of the page:

<% Server.ScriptTimeout = 3600 %>

or set the asp script timeout value in the site setup. I had to set ours to 9600 for it to work.


lowRider

0
 

Author Comment

by:probelaw
Comment Utility
Changing the timeout value to 3600 or even 9600 did not work.  It still returns the error for larger files.
0
 

Expert Comment

by:juliandormon
Comment Utility
I am experiencing a similar issue. Did you resolve it? If so how? Thaks!
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Expert Comment

by:dotec
Comment Utility
GaryC123 wrote:
Are you using Win 2003?  If so there is a default file upload size limit, but you can change it.

But how can I change this default size?

0
 

Author Comment

by:probelaw
Comment Utility
No, this is on win2k system.
0
 
LVL 1

Expert Comment

by:BHertziger
Comment Utility
I am also having this problem both on Win2k and Win2k3 systems.  I have confirmed as much as I can with Persits, but they keep directing me back to their website with the same answers.

I have increased my Server.ScriptTimeout to 1200 (is that minutes or seconds?)

I have tried both t he Upload.Save and Upload.SaveVirtual methods with no change.  In my case, I'm saving to a common storage area on our database server (I run load-balanced webservers, so storing locally is not an option).

I can also upload huge files locally without error, but smaller files remotely do fail.  I have had failures with 8MB files and 72MB files from the same user on the same connection (shared T1).

Is it enough to specify the Server.ScriptTimeout on the same page before the "Upload.Save" is called, or is it specified elsewhere  to affect that?

I keep figuring it's something I'm doing since this is one of the most popular components, and it woudn't be if it failed like this for everyone ...you're assistance is appreciated.
0
 

Expert Comment

by:juliandormon
Comment Utility
Ok. Well it seems to be just one of those bugs - perhaps traffic related - but as far as i can tell there is no real answer for this - however there is a component called HugeASP upload - which seems to solve the problem in my tests - though I haven't put it to commercial use yet. I suggest you give this a go. BTW, when I spoke with Persits about this a long time ago - I more or less got the answer I gave just gave you (minus the bit about the competitor's product)!
0
 
LVL 1

Accepted Solution

by:
BHertziger earned 250 total points
Comment Utility
I finally did find a combination that allowed the large uploads without error.

The Server.ScriptTimeout setting is in seconds, not minutes as I was first lead to believe (and I'm sure it makes sense now).  So the script would time out in 20 minutes before, and one upload was lasting 54 minutes.

I have changed the timeout setting to 7000 (116 minutes), and the user was able to upload without issue.

Based on this, I would recommend those using these components to set that value some percentage over the maximum number of seconds an upload might take.
0
 
LVL 6

Expert Comment

by:masirof
Comment Utility
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: BHertziger

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

masirof
EE Cleanup Volunteer
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now