You can't. The maximum post length is set up in the machine.config file, and
the only way to get ASP.NET to accept posts greater than the default size
(2mb) is to beef up that value to something more acceptable and then do the
size checking yourself.

Still if someone uploads something bigger than the maximum allowed, ASP.NET
will throw an exception that is uncatchable by your page. Set up an error
page, or handle the error in your global.asax file and respond to the user
appropriately.

Adam..

-----Original Message-----
From: Appuswamy Kannan [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 12, 2002 2:26 PM
To: [EMAIL PROTECTED]
Subject: [DOTNET] HTTPException


Hello
I have an ASP.NET application where I have a functionality to upload files.
I need to perform some basic checks on the size of the file etc.  When I
tried to upload a file of size 40MB, I get an error message (page not found)
generated by a private method of HTTPException class.  The name of the
method is

Byte[] GetEntireRawContent()

and it generates an error message titled "Maximum request length exceeded".
Any suggestions on how I intercept this message and display a meaningful
message?

Please 'r' me.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to