1

I have problem with maximum request length exceeded error, when i try upload more then 3-4 photos in my .net mvc app i get:

Server Error in '/' Application.

I found solution for IIS 7:

<system.webServer>
    <security>
        <requestFiltering>
            <requestLimits maxAllowedContentLength="1073741824" />
        </requestFiltering>
    </security>
</system.webServer>

I tried add it to my web.config, but probably it doesn't work for IIS 10 or i did something wrong, because i'm still newbie.

JohnnyBegg43
  • 117
  • 1
  • 10
  • You should edit your question to be just that. A question. If you have an answer, you should post it as an answer. Self-answering is a good thing. – spender Feb 13 '16 at 02:57
  • Possible duplicate of [Maximum request length exceeded](http://stackoverflow.com/questions/3853767/maximum-request-length-exceeded) – Paul-Jan Feb 13 '16 at 11:44

1 Answers1

7

I solved it, just add this maxRequestLength="214748364" to the web.config:

<system.web>
    <httpRuntime targetFramework="4.5.2" maxRequestLength="214748364" />
</system.web>
Chun Lin
  • 534
  • 14
  • 34
JohnnyBegg43
  • 117
  • 1
  • 10
  • @Chun I am geting The requested page cannot be accessed because the related configuration data for the page is invalid. – user123456 Sep 22 '20 at 06:42
  • @user123456 This should be another problem because the cause of having that error message is related to the configuration file has invalid format or corrupted. You can refer to the discussion of that problem in another thread: https://stackoverflow.com/questions/9216158/iis-500-19-with-0x80070005-the-requested-page-cannot-be-accessed-because-the-rel – Chun Lin Sep 23 '20 at 11:58