When you try to upload a 5 MB file, IIS will not handle the request since
the maximum post size is set to 4 MB. As a result, you get a "Page Not Found
Error".
Couple of things you can do:
1. Increase the Max Size to more than 5 MB, but before the action, look the
posted file size on the server and return the error message to the user if
the size is > 4MB.
2. You can trap the specific IIS error and redirect the user to a custom
error page.
3. You can install a client size activeX which reads the file size from the
client side and disables the post if size > 4 MB.
Good luck
Shuvro
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
"Sundar" <Su****@discussions.microsoft.com> wrote in message
news:1A**********************************@microsof t.com...
Hi
I created one mail form. And Im attaching one file. In web.config I set
the maxlength to the file is 4mb. Now im trying to upload 5mb. Now "The page
Not found" error occurs.(I cant able to debug also Immediately after the
attachment and submit button then the above error occors.) Actually I
want to display the message to the user (The maximum size of the file should be
4MB. like this) and to display the same page to select further attachment.
How can I do this?]