How to resolve the IIS7 upload file size limit, the. NET upload file cannot find the directory resolution

Source: Internet
Author: User

IIS7 default File Upload size is 30M, then more than 30M files can not be uploaded, then you need to modify the IIS configuration file.

In the actual application will often appear too large upload file, can not upload the situation, that is because of IIS to upload file size limit, IIS7 default file upload size is 30M, to break through this limit need to make a change:

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

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

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

Note: The%windir%\system32\inetsrv\config\applicationhost.config file must not be replaced with another machine's files, otherwise IIS will not be able to start this file record, the current IIS all site, the APP Pool, as well as some machine-related configurations.

2. Modify the Web. config

      <system.web>        

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

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

How to resolve the IIS7 upload file size limit, the. NET upload file cannot find the directory resolution

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.