How to resolve IIS7 upload file size limit __iis

Source: Internet
Author: User
IIS7 default File Upload size is 30M, then more than 30M of files can not be uploaded, then you need to modify the configuration file for IIS.

In the actual application of the upload file is often too large, unable to upload the situation, that is because of the size of the upload file IIS restrictions, IIS7 default file upload size is 30M, to break through this limitation needs to do a change:

1. Open%windir%\system32\inetsrv\config\applicationhost.config Find: <requestFiltering> node

This node defaults to no <requestlimits maxallowedcontentlength= "Upload size value (in bytes)"/> element, and the maximum number tested on IIS 7 and IIS 7.5 can only be < RequestLimits maxallowedcontentlength= "4294967295"/> <4GB,

Add the following case element for this node: <requestlimits maxallowedcontentlength= "2147483647"/>, the upload size will be changed to 2G

Note:%windir%\system32\inetsrv\config\applicationhost.config files must not be replaced with other machine files, or IIS will not be able to start this file record, all site in current IIS, APP Pool information, as well as some machine-related configuration.

2. Modify Web.config

      <system.web>
        

3.web.config If you have the following nodes (this node is designed for IIS 7), modify:

ApplicationHost.config of "2147483647"/> Units and <requestLimits in <requestlimits maxallowedcontentlength= Maxallowedcontentlength= "2147483647"/> Consistent, its maximum value can only be 4294967295<system.webserver>
        <security>
          <requestFiltering>
            <requestlimits maxallowedcontentlength= "2147483647"/>
          </ requestfiltering>
        </security>
      </system.webServer>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.