Solution for uploading large files in ASP. NET

Source: Internet
Author: User
Make the following configuration in the web. config file:
<Configuration>
<System. Web>
<Httpruntime maxrequestlength = "1048576" executiontimeout = "3600"/>
</System. Web>
</Configuration>

Maxrequestlength is the maximum number of bytes of the uploaded file, in KB. The default value is 4096 KB (4 MB ). Executiontimeout: indicates the maximum number of seconds allowed to execute a request before it is automatically disabled by ASP. NET.
When uploading a large file, you may receive the following error message:
Aspnet_wp.exe (PID: 1520) is recycled because the memory consumption exceeds 460 MB (60 percent of available RAM ).
If this error message is returned, add an application.ProgramThe value of the memorylimit attribute in the element of the web. config file. For example:
<Configuration>
<System. Web>
<Processmodel memorylimit = "80"/>
</System. Web>
</Configuration>

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.