C# HTTP Error 413.1 - Request Entity Too Large - unable to gracefully handle this error

Last Reply 7 days ago By arjunv

Posted 8 days ago

HTTP Error 413.1 - Request Entity Too Large The page was not displayed because the request entity is too large

I have these settings in my config file:


        <requestLimits maxAllowedContentLength="200288000" />

<httpRuntime executionTimeout="5400" maxRequestLength="200288" />

Those two settings set the max file size upload limits. However, when I test with a larger file, I get the IIS error page and am unable to gracefully catch and handle this error.

I've tried setting customErrors to On or Custom, but when the error occurs, it doesn't hit either the default redirect or the custom redirrect?


<customErrors mode="On" defaultRedirect="/custom_error.aspx">

  <error statusCode="413" redirect="/UploadError.aspx" />

I just want to show a friendly page when this error occurs.

You are viewing reply posted by: arjunv 7 days ago.
Posted 7 days ago

hii Anjali, 

   Kindly try below link and setting as per your Operating system. I hope this will work.