[Reprint] windows 7 IIS 7.5 ASP. Net file upload size limit, 7.5asp.net

Source: Internet
Author: User

[Reprint] windows 7 IIS 7.5 ASP. Net file upload size limit, 7.5asp.net

Source:

Author: Yun Zhongyue

Link: http://www.cnblogs.com/netlover/archive/2011/07/08/Win7_IIS_Upload.html

IS 7 the default file upload size IS 30 mb
To break through this restriction:

1. Modify IIS applicationhost. config

Open % windir % \ system32 \ inetsrv \ config \ applicationhost. config

Find: <requestFiltering> node,

This node has no <requestLimits maxAllowedContentLength = "upload size value (unit: byte)"/> element by default, the maximum value tested on IIS 7 and IIS 7.5 is <requestLimits maxAllowedContentLength = "4294967295"/> <4 GB,

Add the following example element to this node: <requestLimits maxAllowedContentLength = "2147483647"/>. The upload size is changed to 2 GB.

Note: The % windir % \ system32 \ inetsrv \ config \ applicationhost. config file must not be replaced with files on other machines; otherwise, IIS will not be able to start

This file records all the Site and App pool information in IIS and some machine-related configurations.

2. modify web. config

<System. web> 

Note: The maximum value of maxRequestLength can only be 2097151 K. If the value is greater than this value, the following error occurs:

Configuration ErrorDescription: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: The value for the property 'maxRequestLength' is not valid. The error is: The value must be inside the range 0-2097151.Source Error: Line 117:    

3. If the following nodes exist under web. config (this node is designed for IIS 7), modify

<RequestLimits maxAllowedContentLength = "2147483647"/> unit and applicationhost. <requestLimits maxAllowedContentLength = "2147483647"/> in config is the same, and its maximum value is only 4294967295 <system. webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength = "2147483647"/> </requestFiltering> </security> </system. webServer>

Conclusion: The maximum size of files uploaded by asp.net (IIS 7 and IIS 7.5) cannot exceed 2 GB.

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.