Solve iis7 upload large files in windows Server

Source: Internet
Author: User

The original project was migrated to IIS7, and a problem occurred. The Function of uploading large files suddenly became unavailable, after uploading the file for a while, the system will prompt 404 Error-_-|. I checked it online and found that it was the reason why IIS7 sets the size limit by default.


Method 1

In IIS7, even if you are on the web. config sets maxRequestLength = "1048576" to the maximum size that can be uploaded. In fact, it is affected by C:/Windows/System32/inetsrv/config/applicationHost. by default, only 30 MB files can be uploaded. You can modify this file. add in webServer/security/requestFiltering/section

<RequestLimits maxAllowedContentLength = "<length>"/>

Modify <length> to the allowed size. Note that the unit here is bytes, and the unit of maxRequestLength in web. config is KB.


Another method


1. Stop IIS7

 

2. Find the "C:/Windows/System32/inetsrv/config/schema/IIS_schema.xml" file.

 

This file is read-only, that is, the administrator permission cannot be modified. You must first modify the file permission and then remove the read-only attribute.

 

1. Right-click a file and choose Properties> Security. Select the target user and click advanced to modify the file owner;

 

2. Click "edit" to modify the permissions of the current user and add the "write" permission. Now, the permission settings are OK.

 

3. Remove the read-only attribute of the file.

 

Open the file in Notepad, find "", and change "30000000" to the desired value (for example, 2000000000) and save it.


Add the read-only attribute to the "C:/Windows/System32/inetsrv/config/schema/IIS_schema.xml" file.

 

Start IIS7. Upload a m video file

Note:

Win2008 can only upload files smaller than 2 GB. Note this.

Related Article

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.