File to big to upload.

U

UJ

I'm trying to limit the size of a file the user can upload. I want it so
that if the file is larger than 100MB, I tell them it needs to be smaller. I
put code in when they 'upload' the file to check the size but if the file is
larger than 100MB (which is what I check for) I get an error saying it can't
display the page.

I though I read somewhere about a limit set somewhere in IIS as to the size
of the files that are allowed to be uploaded.

I did find a KB article at support.ms that talks about catching an
application error and checking to see if it's on the page I'm interested in
and redirect to an error page. I put this code in and it never seems to be
fired.

Can anybody give any help?

TIA - Jeff.
 
P

Patrice

What is the KB you found and the code you used ?

This limit is configurable as the IIS level (in the metabase.xml file, 200
Ko by default if I remember).

AFAIK this is an error that is raised outside of your own code i.e. you
should be able to catch this in a global handler (global.asax file,
Application_Error event) but not in a page error handler.
 
W

Winista

Request size errors are handled at IIS level. So if somebody is trying to
upload a huge file, your web application will never get a chance to handle
it. It will be rejected at the front door, IIS.
 
U

UJ

How can I change the size that IIS will allow?

Winista said:
Request size errors are handled at IIS level. So if somebody is trying to
upload a huge file, your web application will never get a chance to handle
it. It will be rejected at the front door, IIS.
 

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,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top