Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams I'm confused. The accepted answer is 2147483647, but this answer which is up-voted a lot more says 2097151. Which is it? Homer Jan 8, 2016 at 21:27 @Homer one is bytes and the other is kilobytes. The value is specified in kB so you should use 2097151 Ramón May 2, 2016 at 23:06 @Homer the accepted answer only states the maximum value of the int type, where as IIS accepts this as the maximum value. ywm Jul 6, 2016 at 10:39
<system.web>
    <httpRuntime maxRequestLength="2097152" requestLengthDiskThreshold="2097152" executionTimeout="240"/>
</system.web>
<system.webServer>
    <security>
        <requestFiltering>
            <requestLimits maxAllowedContentLength="2147483648" />
        </requestFiltering>
    </security>
</system.webServer>
                If I am not wrong the maxRequestLength is in bytes. So the max value should be also 2147483648
– Sanchitos
                Aug 16, 2019 at 1:45

UPDATE

As for the Maximum, since it is an int data type, then theoretically you can go up to 2,147,483,647. Also I wanted to make sure that you are aware that IIS 7 uses maxAllowedContentLength for specifying file upload size. By default it is set to 30000000 around 30MB and being an uint, it should theoretically allow a max of 4,294,967,295

Equivalent of your value would be 2,097,152 (kB), which is out of range by 1. The maximum value is 2,097,151 (kB) i.e. 2,147,482,624 bytes. – Peter Ivan Jan 10, 2013 at 12:47 Int32.MaxValue is 2,147,483,647. I didn't make this number up. If you doubt me, open up PowerShell and type [int]::maxvalue and see what you get. – Mark Jan 10, 2013 at 16:36 Have you tried to set maxRequestLength to 2,147,483,647 or 2,097,152? You'll get a Configuration Error. That's why your answer is incorrect and I comment on it. [int]::maxvalue is not in an allowed range. – Peter Ivan Jan 11, 2013 at 7:12 I've test maxRequestLength = 2147483648 and did not receive an error for IIS 7.5. Mark is correct. Perhaps it is different for IIS 6? – Timothy Schoonover Sep 25, 2015 at 14:25

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.