Confusing required maxRequestLength and maxAllowedContentLength settings [Answered]RSS

1 reply

Last post Jul 27, 2010 05:00 AM by Leo Tang - MSFT

  • Confusing required maxRequestLength and maxAllowedContentLength settings

    Jul 22, 2010 04:58 AM|martijnvm|LINK

    Hi all,

    Can somebody confirm that for IIS 7.5 I need to set the maxRequestLength and the maxAllowedContentLength values, to be able to upload large files?

    If I don't set the maxRequestLength value, I'm not able to upload files larger than approximately 1 Mb. Even while the default IIS 7.5 maxAllowedContentLength value is 30000000 bytes (28.6 Mb).

    These two required settings confuse me, hopefully someone can help me out.

    The settings:

    <system.web>
        <httpRuntime maxRequestLength="153600" executionTimeout="900" />
    </system.web>

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

     

  • Re: Confusing required maxRequestLength and maxAllowedContentLength settings

    Jul 27, 2010 05:00 AM|Leo Tang - MSFT|LINK

    Hi,

    The maxRequestLength indicates the maximum file upload size supported by ASP.NET, the maxAllowedContentLength specifies the maximum length of content in a request supported by IIS. Hence, we need to set both maxRequestLength and maxAllowedContentLength values to upload large files.

    Please mark the replies as answers if they help or unmark if not.
    Feedback to us