1

I have a web application and users started uploading large files. To avoid errors i did this:

1- Set the httpRuntime maxRequestLength.
2- Edited the Application_Error function of Global.asax to this:

                Server.ClearError();
                Response.Redirect(Request.RawUrl, false);
                return;

It all works well when i have fiddler on, and the user gets redirected to the same page. But if fiddler is off the browser shows this:

Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.

What am i doing wrong?

Klinkerhofen
  • 147
  • 1
  • 10
  • make sure you are getting correct url using Request.RawUrl. In line: Response.Redirect(Request.RawUrl, false); it seems page is redirected to the same page again and again, try to find using debug statement. – Ashwini Verma Feb 07 '13 at 14:35
  • 1
    What do you intend with this redirection? And why are you dealing with Application_Error if you are trying to "avoid" error? Do you intend to mask it? – Androiderson Feb 07 '13 at 14:37
  • Ashwini/Anderson - There is no cycle. The user makes an oversize POST and i intend to redirect him to the same page (GET) and show a error message instead of a ugly error – Klinkerhofen Feb 08 '13 at 16:39

0 Answers0