Solved

How manage HTTP Error 404.13 during File Upload

Posted on 2011-03-22
1
2,462 Views
Last Modified: 2012-05-11
Hello Experts,
I created  an ASP.NET application that use FileUpload control.
I fixed maximun dimension of upload to 20Mb and everything work well.

If the user try to upload a file more than 20Mb correctly appears a WEB Page that show the HTTP Error 401.13.

I would like capture the error and redirect the browser to my customized web page.
I have tried to capture the error in page_error event, in global.asax Application_error, forcing the redirect using  Response.Redirect() or Server.Execute() but  they seem to be ignored and the standar Error page continues to appear.

Someone may suggest me how to manage the correct error catch and redirect?

Thanks
Erik
0
Comment
Question by:ErikIce
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 11

Accepted Solution

by:
lenordiste earned 500 total points
ID: 35193357
You ll have to work on the HttpApplication.EndRequest of your exception handler and check the response status code (401.13 in your case) and then take the necessary decisions (redirect to a custom error page for instance). You might also want to check for the request's URL to make sure you are handling the FTP file size problem.

This thread here is spot-on, you can easily use the answer and modify it to your needs:
http://stackoverflow.com/questions/567273/where-do-i-catch-and-handle-maxallowedcontentlength-exceeded-in-iis7
0

Featured Post

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question