1

When I tried to upload more than 50 MB of filesize the below error is getting displayed as there is a requirement of allowed Max file size is 50 MB and to show the user-friendly message in the application if the attached file size is more than 50 MB>

Error in browser: (IIS version 10.0.14..)

HTTP Error 413.1 - Request Entity Too Large

The page was not displayed because the request entity is too large.

Tired the below settings in web.config but didn't work by enabling custom error in web.config.

link - https://learn.microsoft.com/en-us/iis/configuration/system.webserver/httperrors/

<system.webServer>
    <httpErrors errorMode="DetailedLocalOnly" defaultResponseMode="File" >
      <remove statusCode="500" />
      <error statusCode="413"
         prefixLanguageFilePath="~"
         path="Error.aspx" />
    </httpErrors>
  </system.webServer>

Need to show user-friendly error within the application or would redirect to a custom error page.

Nanda kumar
  • 111
  • 4
  • 13
  • Someone already suggests .check below link. might be helpful for you. .https://stackoverflow.com/questions/22762311/the-page-was-not-displayed-because-the-request-entity-is-too-large-on-iis – SUNIL DHAPPADHULE Jul 10 '19 at 03:36
  • Did you resolve the problem? I have same problem but didn't figure out how to solve it yet. – Agile Hobo Jul 10 '19 at 10:48

0 Answers0