Author: dude9er | Posted on: 8/31/2009 3:08:00 PM | Views : 267

I have a form that allows the user to attach a file.
I hav elimited te file size to 3MB.  I am trying to validate the size of the file and show an error message that tells teh user the file is too large.  My code below seems to work, but if the file size is 4mb or so or higher I get a default asp.net error message that says:
Server Error in '/rezpage-affiliate.com' Application. Maximum request length exceeded. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Maximum request length exceeded.
I obviously want to show the suer my default mesaage n ...

Go to the complete details ...