It can be confirmed that the webconfig file is used for control. This is my configuration. First, I successfully uploaded a file larger than 6 MB.
<? XML version = "1.0" encoding = "UTF-8"?>
<Configuration>
<System. Web>
<Httpruntime maxrequestlength = "40000"/>
</System. Web>
</Configuration>
Before that, no " "Configuration file, the file to be uploaded 6 m should have a problem.
Maxrequestlength is the maximum number of bytes for uploading files.
When uploading large files, you can use ElementMaxrequestlengthAttribute to increase the maximum allowed file size. When the file size exceeds the specified size, a DNS error occurs in the browser. When uploading large files, you may also 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.ProgramIn the Web. config file ElementMemorylimitAttribute Value.