We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

IIS10 Max file upload size RSS

3 replies

Last post May 07, 2021 06:03 AM by samwu

  • IIS10 Max file upload size

    May 05, 2021 01:26 PM|buc1001|LINK

    Hi, reading a lot of conflicting information regarding this, but trying to upload file sizes larger than 2GB using IIS with PHP. ALL of the PHP side has been configured appropriately, with the following configured in the webconfig:

    <requestFiltering>
                    <requestLimits maxAllowedContentLength="4294967295" />
                </requestFiltering>

    <system.web>
            <httpRuntime maxRequestLength="2147483647" />
        </system.web>

    I believe the above are the max setting (apologies not a web administrator) allowed for IIS? However, seem to hit 2Gb hard limit on uploads. Is it correct that IIS has a limit of 2GB, while asp.net 4GB? Is there anything I am overlooking? If indeed 2Gb is the limit, then at least I can draw a line under this and work with that. 

    Thanks in advance for any further information and advice. 

  • Re: IIS10 Max file upload size

    May 06, 2021 07:10 AM|samwu|LINK

    Hi buc1001,

    buc1001

    <requestFiltering>
                    <requestLimits maxAllowedContentLength="4294967295" />
                </requestFiltering>

    According to microsoft docs maxAllowedContentLength has type uint, its maximum value is 4294967295 bytes = 4 GB.

    According to microsoft docs maxRequestLength has type kilobytes, its maximum value is 2147483647 kilobytes= 2 TB.

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
  • Re: IIS10 Max file upload size

    May 06, 2021 01:50 PM|buc1001|LINK

    Hi Samwu,

    Thanks for the information. I can take it from this that with the above settings both at max values and still hitting 2Gb max file upload size limit, then this is a hard limit within IIS? Tried numerous configurations without success. Either requires other settings changing that I am not aware of, or that is the limit for IIS. Back to the drawing board I guess. 

    Regards

  • Re: IIS10 Max file upload size

    May 07, 2021 06:03 AM|samwu|LINK

    Hi buc10001,

    buc1001

    Thanks for the information. I can take it from this that with the above settings both at max values and still hitting 2Gb max file upload size limit, then this is a hard limit within IIS? Tried numerous configurations without success. Either requires other settings changing that I am not aware of, or that is the limit for IIS. Back to the drawing board I guess. 

    Have you set up Request Filtering? The setting Maximum allowed content length in Request Filtering will also affect the size of the uploaded file in iis.

    1. Open IIS Manager.
    2. Select the website that you want to configure.
    3. Select Requests Filtering and open it by double-clicking the icon. The Request Filtering pane displays.
    4. From the Actions pane on the right hand side of the screen click Edit Feature Settings... link. The Edit Request Filtering Settings window displays.
    5. In the Request Limits section, enter the appropriate Maximum allowed content length (Bytes Specifying zero for this value means that the length is unlimited.) and then click the OK button.
    6. Restart IIS.

    More information about Request Filtering you can refer to this link: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh831518(v=ws.11)?redirectedfrom=MSDN#URL_Page.

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >