Error while uploading big files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?]
 
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
 
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
 
Thanks Shurvo Mazumder
But I dont want to allow upload more than 4mb to the user. And I want to
redirect to the same page ( or otherpage in the same solution but the user
should not logout) I m passing Session ID to all the pages and verifying
the same in the page for user identification.

Shuvro Mazumder said:
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 said:
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?]
 
Back
Top