ASP upload fails when files dimensions exceed 3MB. Why ?

N

Newcomsas

Hello.

I'm experiecing a problem with file uploads from ASP pages.

On a Windows 2000 - IIS 5 server we're running an ASP Classic
application that features an upload form for files of great dimensions
(100+MB). Problem is, when we try to upload a file exceeding 3MB we
retive almost immediatly a message such as 'The page cannot be
displayed'.

We do not even reach the page that contains the code for file
managing; when we click on the submit button in the form with enctype
multipart form data the application ends and the error is visualized.

For files under 3MB there are no problems at all.

The FAQ of our upload third party component (ABCUpload by Websupergoo)
state that we could either have problems with our proxy or we could be
stopped by a wrong URLScan setting: we do not have any proxy nor
URLScan is installed on our server.

I may add that all the configuration of the script timeouts on IIS are
correctly set.

Is there anyone who can suggest us a solution ?

Thanks in advance for any help...

Newcomsas
 
A

Anthony Jones

Newcomsas said:
Hello.

I'm experiecing a problem with file uploads from ASP pages.

On a Windows 2000 - IIS 5 server we're running an ASP Classic
application that features an upload form for files of great dimensions
(100+MB). Problem is, when we try to upload a file exceeding 3MB we
retive almost immediatly a message such as 'The page cannot be
displayed'.

100+MB seems a bit exessive for a POST techinque.
We do not even reach the page that contains the code for file
managing; when we click on the submit button in the form with enctype
multipart form data the application ends and the error is visualized.

For files under 3MB there are no problems at all.

So you tested with a 4MB file and that failed right?

The FAQ of our upload third party component (ABCUpload by Websupergoo)
state that we could either have problems with our proxy or we could be
stopped by a wrong URLScan setting: we do not have any proxy nor
URLScan is installed on our server.

No mention in the FAQ of the AspMaxRequestEntityAllowed metabase setting? On
IIS5 this as a 1GB default but if it has been set to a much lower limit then
you would immediately get a 403 Forbidden when trying post a larger entity.

I may add that all the configuration of the script timeouts on IIS are
correctly set.

Since you getting a quick response it would seem the server is reading the
Content-Length of the POST and responding with an error. So timeouts are
unlikely to be the problem.
 
N

Newcomsas

So you tested with a 4MB file and that failed right?

Well, actually I tried with a 6MB file, not a big difference anyway...
No mention in the FAQ of the AspMaxRequestEntityAllowed metabase setting? On
IIS5 this as a 1GB default but if it has been set to a much lower limit then
you would immediately get a 403 Forbidden when trying post a larger entity.

I downloaded a metabase editor, but this DWORD key was not present
(there were keys like Path, AccessFlags etc.).
Shall I suppose that the IIS default value is thus 1GB ?

Thanks,
Newcomsas
 
D

Dave Anderson

Newcomsas said:
On a Windows 2000 - IIS 5 server we're running an ASP Classic
application that features an upload form for files of great
dimensions (100+MB). Problem is, when we try to upload a file
exceeding 3MB we retive almost immediatly a message such as
'The page cannot be displayed'.

We do not even reach the page that contains the code for file
managing; when we click on the submit button in the form with
enctype multipart form data the application ends and the error
is visualized.

For files under 3MB there are no problems at all.

The FAQ of our upload third party component (ABCUpload by
Websupergoo) state that we could either have problems with
our proxy or we could be stopped by a wrong URLScan setting:
we do not have any proxy nor URLScan is installed on our server.

I may add that all the configuration of the script timeouts on
IIS are correctly set.

It does not appear that IIS 5 is the problem -- I just uploaded an 80MB file
to one of our IIS 5 servers to be sure -- although you may want to examine
your metabase value for AspSessionMax. I am not sure whether your component
is affected by the metabase value, however.

We recently set out to free ourselves from dependence on upload components,
and settled on an ASP.NET 2.0 solution. We even designed it for integration
with classic ASP applications -- and have found it to be a very flexible
approach.

[off-topic]
My only real quibble with the ASP.NET approach concerns error handling.
Suppose you want to limit uploads to 64MB. Then you would put this in your
web.config, right?

<httpRuntime maxRequestLength="65536" ... />

That depends on whether you want or need access to the rest of the form
submission for such things as error messaging. If the upload exceeds the
maxRequestLength, the error falls into the Application_Error scope, not the
Page_Error. This means two things:

1. You can't use try...catch and gracefully reject based on filesize
2. When you DO handle the error, you lose access to all of the
useful parts of the HttpRequest, such as the Form items.

One alternative is to really crank up maxRequestLength, but then you have to
allow very large uploads to complete simply for the purpose of rejecting
them.
 
A

Anthony Jones

Newcomsas said:
Well, actually I tried with a 6MB file, not a big difference anyway...
entity.

I downloaded a metabase editor, but this DWORD key was not present
(there were keys like Path, AccessFlags etc.).
Shall I suppose that the IIS default value is thus 1GB ?

Thanks,
Newcomsas

You'll find an entry for the default value in Schema/Properties/Defaults
(it's ID is 7053 BTW). However it would be bad form for someone to have
tweaked that value there.

You have checked for this property along the whole path to where your ASP
page is from LM/W3SVC ?
 
N

Newcomsas

You'll find an entry for the default value in Schema/Properties/Defaults
(it's ID is 7053 BTW). However it would be bad form for someone to have
tweaked that value there.

I've found the entry and its value is the default 1GB.
You have checked for this property along the whole path to where your ASP
page is from LM/W3SVC ?- Nascondi testo tra virgolette -

I've also looked for the key under W3SVC-->correct-website-folder but
I did not find it; so I assume the IIS default value is considered.

Newcomsas
 
N

Newcomsas

I think there is something really weired on my server: I restarted IIS
and the error message changed to 'Page not found - error 404'. It is
of no use placing a response.end at the top of the page that manages
the file: the error compares anyway; this managing page is not
evidently reached; the application stops on the html page that holds
the form multipart.

As usual when I try to upload small files (less than 3MB) everything
works fine.

Newcomsas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top