IIS7 large File upload limit solution in Windows

Source: Internet
Author: User
Tags file upload

Under the IIS7, even if you set the Maxrequestlength= "1048576" the maximum allowable upload size in web.config, it is also useless, is actually by the c:/windows/system32/inetsrv/config/ ApplicationHost.config limit, the default maximum can only upload 30M file, modify this file is good, in the system.webserver/security/requestfiltering/section of the file to add

<requestlimits maxallowedcontentlength = "<length>"/>

on the line, will <length> modify for the size you want to allow, note that the unit here is bytes, while web.config in the maxRequestLength Unit is KB

The specific methods are as follows

The goal is to modify the file C:/windows/system32/inetsrv/config/schema/iis_schema.xml. The Red underline section allows us to modify the target position.

The code is as follows Copy Code

<element name= "RequestLimits" >

<attribute name= "maxAllowedContentLength" type= "uint" defaultvalue= "30000000"/>

<attribute name= "MaxUrl" type= "uint" defaultvalue= "4096"/>

<attribute name= "maxquerystring" type= "UINT" defaultvalue= "2048"/>

<element name= "Headerlimits" >

<collection addelement= "Add" clearelement= "clear" removeelement= "Remove" >

<attribute name= "Header" Type= "string" required= "true" isuniquekey= "true" validationtype= "nonemptystring"/>

<attribute name= "SizeLimit" type= "UINT" required= "true"/>

</collection>

</element>

The problem is that this file is read-only and cannot be modified with administrator privileges. To modify the permissions of the file first, and then remove the read-only property.

1. Right key file-> attribute-> security, select Target user, click Advanced, modify file owner;

2. After the confirmation click Edit, you can modify the current user's permissions, add "Write" permission. At this point, the permission settings are OK.

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

4. Open vs as Administrator, then edit the target XML file in VS, and modify the desired location.

Reboot IIS after modification.

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.