Recently, in doing an upload attachment function, but the file is more than 4M, the uploaded file over the length of the issue
How to solve this problem? Here I find the information, to understand the problem, there are 3 ways to solve
Scenario One: Modify the value of maxRequestLength in the Web. config configuration file for your project
Scenario Two: Modify the value of maxRequestLength in the Machine.config configuration file under the installation directory of the. NET Framework
Scenario Three: Modify the upload file size limit for the IIS service
Programme one:
1, modify the Web. config file, change this maxrequestlength default value, here is changed to 10M
<configuration> <system.web>
<configuration>
Scenario Two:
1. Locate the Machine.config file in the C:/windows/microsoft.net/framework/v1.1.4322/config directory
2, find "
Programme III:
1, first to the process of the IIS service shut down, that is, the Inetinfo.exe process off.
2, found in the system directory: Windows/system32/inesrv/metabase.xml "file, find a text editor to open,
Find the Aspmaxrequestentityallowed= "204800", this is the default size of the IIS upload file, the default is 204800Byte,
That is 200KB, you can change it to the desired size.
How to solve the problem of Asp.net.mvc uploading attachments over length?