Solved

How manage HTTP Error 404.13 during File Upload

Posted on 2011-03-22
1
2,407 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now