By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,397 Members | 2,552 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,397 IT Pros & Developers. It's quick & easy.

Error while uploading big files

P: n/a
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?]
Jul 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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

"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?]

Jul 21 '05 #2

P: n/a
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?]

Jul 21 '05 #3

P: n/a
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 [MSFT]" wrote:
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?]


Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.