The original project was migrated to IIS7, and a problem occurred. The Function of uploading large files suddenly became unavailable, after uploading the file for a while, the system will prompt 404 Error-_-|. I checked it online and found that it was the reason why IIS7 sets the size limit by default.
Method 1
In IIS7, even if you are on the web. config sets maxRequestLength = "1048576" to the maximum size that can be uploaded. In fact, it is affected by C:/Windows/System32/inetsrv/config/applicationHost. by default, only 30 MB files can be uploaded. You can modify this file. add in webServer/security/requestFiltering/section
<RequestLimits maxAllowedContentLength = "<length>"/>
Modify <length> to the allowed size. Note that the unit here is bytes, and the unit of maxRequestLength in web. config is KB.
Another method
1. Stop IIS7
2. Find the "C:/Windows/System32/inetsrv/config/schema/IIS_schema.xml" file.
This file is read-only, that is, the administrator permission cannot be modified. You must first modify the file permission and then remove the read-only attribute.
1. Right-click a file and choose Properties> Security. Select the target user and click advanced to modify the file owner;
2. Click "edit" to modify the permissions of the current user and add the "write" permission. Now, the permission settings are OK.
3. Remove the read-only attribute of the file.
Open the file in Notepad, find "", and change "30000000" to the desired value (for example, 2000000000) and save it.
Add the read-only attribute to the "C:/Windows/System32/inetsrv/config/schema/IIS_schema.xml" file.
Start IIS7. Upload a m video file
Note:
Win2008 can only upload files smaller than 2 GB. Note this.