How to solve the problem that asp.net uploads files beyond the maximum Request Length? asp.net uploads files

Source: Internet
Author: User

How to solve the problem that asp.net uploads files beyond the maximum Request Length? asp.net uploads files
Error message: exceeds the maximum Request Length

Cause of error: asp.net defaults to a maximum file size of 4 MB and a running timeout value of 90 S.

Solution

1. Modify the web. config file to change the default value.

 

  

   

   

  

 

2. Another method is to modify the. NET FrameWork:

(1) modify the machine. CONFIG file in the C:/WINDOWS/Microsoft. NET/Framework/v1.1.4322/config directory.

(2) Search"

In this way, any web project can upload files up to 8 Mb.

3. By the way, how does one modify the size of the uploaded files in IIS:

(1) first, the iisservice is closed in the process, that is, the inetinfo.exe process is closed.

(2) In the system directory, find windows/system32/inesrv/metabase. xml file, open it in a text editor, and find AspMaxRequestEntityAllowed = "204800". This is the default size of the File Uploaded by iis. The default value is 204800 bytes, Which is kb, change it to the desired size.

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.