Maximum value of maxRequestLength?

.NetIis 7.Net 4.0Maxrequestlength

.Net Problem Overview


If we are using IIS 7 and .Net Framework 4, what will be the maximum value of maxRequestLength?

.Net Solutions


Solution 1 - .Net

Maximum is 2097151, If you try set more error occurred.

Solution 2 - .Net

These two settings worked for me to upload 1GB mp4 videos.

<system.web>
    <httpRuntime maxRequestLength="2097152" requestLengthDiskThreshold="2097152" executionTimeout="240"/>
</system.web>
<system.webServer>
    <security>
        <requestFiltering>
            <requestLimits maxAllowedContentLength="2147483648" />
        </requestFiltering>
    </security>
</system.webServer>

Solution 3 - .Net

As per MSDN the default value is 4096 KB (4 MB).

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

Solution 4 - .Net

2,147,483,647 bytes, since the value is a signed integer (Int32). That's probably more than you'll need.

Solution 5 - .Net

Right value is below. (Tried)

maxRequestLength="2147483647" targetFramework="4.5.2"/>

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionErkan BALABANView Question on Stackoverflow
Solution 1 - .NetPetrView Answer on Stackoverflow
Solution 2 - .NetJJ_Coder4HireView Answer on Stackoverflow
Solution 3 - .NetWaleed Al-BalooshiView Answer on Stackoverflow
Solution 4 - .NetMarkView Answer on Stackoverflow
Solution 5 - .NetÖzgün Seyhan TemelView Answer on Stackoverflow