Solution for uploading files in ASP under IIS cannot exceed KB

Source: Internet
Author: User
Tags metabase

In win2008 (IIS 7.0) and win2003 (IIS 6.0), the default settings are especially strict and secure, in this way, attacks caused by too many loose timeouts and restrictions can be minimized.

The size of the entity body in the ASP request is 200,000 (IIS6 is 204,800) bytes, which is not limited in versions earlier than IIS 6.0.

This leads to a file upload failure of more than 200 kb, but in fact the data cannot be submitted more than 200 kb. you can post a long post and try again.

For more information about iis7.0 settings, visit the new cloud network (www.newasp.net ).

Iis7.0 can be modified as follows:

Open IIS manager -- double-click "asp" in "IIS" -- Open "Configure ASPProgram"-- Expand" restricted attributes ";

Modify the value of "Maximum Request Entity subject limit". The default value is 200000 (less than KB );

Modify the size you want to modify, for example, 52000000 (50 MB ).

After the modification is complete, click "application" OK!

Iis6.0 can be modified as follows:

Disable the IIS Admin Service in the service

Find metabase. xml under windows \ system32 \ inetsrv,

Open and find aspmaxrequestentityallowed to change it to the required value. The default value is 204800, that is, 200 K.

Change it to 51200000 (50 MB)

Restart the IIS Admin Service.

To download attachments that exceed 4 MB in IIS 6.0, follow these steps:

1. Disable the IIS Admin Service in the service.

2. Find the metabase. xml file under windows \ system32 \ inetsrv.

3. Open it in plain text mode. Find aspbufferinglimit and change it to the expected value. The default value is 4194304 (you can change it to 20 m, that is, 20480000 ).

4. Save the disk and restart the IIS Admin Service. Run the iisreset command in cmd to restart the instance.

ArticleFrom: good love Learning Network (http://www.haoxiai.net) Web site: http://www.haoxiai.net/fuwuqi/fuwuqijishu/142146.html

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.