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>