Yesterday I remade the system for the company's server. When I encountered the Asp attachment that could not be uploaded, I used it well on the server before, but it would be abnormal if it was redone. So I gave a solution to Google and Baidu. I will send out the following solutions to help friends who encounter this problem avoid detours:
1. Permission issues
Please make sure that the folder "Guest User" of the file you upload has permission to write, some are stored in the database, and they also need to have permission to modify.
2. File size limit
IIS 6 For security reasons, the default maximum request is 200K (that is, the maximum submission data limit is 200KByte, 204800Byte).
Solution:Close the IIS Admin Service
Open /Windows/system32/inesrv/metabase.xml
Modify the value of ASPMaxRequestEntityAllowed to what you need, the default is 204800
Start IIS Admin Service
After modification, you need to modify the machine.config file
In Asp.net, the default size of uploaded files is 4096 KB, which is 4M, but you can change this data in Web.config. The most commonly used method is to directly modify the machine.config file in the C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/CONFIG directory (the Framework version will be different, you will enter the directory of the version you use), and find httpruntime to change the value of maxRequestLength to the ideal value in this line. For example, if you want 8M, enter 8192.
3. Chinese system, installed English patch for IIS
After inspection, it was found that the host used by the customer was the Chinese version of Windows 2003, and later changed to the English version of Windows, and an error occurred.
Generally speaking, the same problem sometimes occurs after the system has been upgraded to IIS or patched. We just need to add a piece of code in front of the ASP file.
<!-- must be fist line in ASP -->
<% @LCID=4100 %>
4. Language issues
Set the regional settings to [China] in the control panel
5. Date, time issue
In the control panel, set the time format to: H:mm:ss in the control panel "Date Time" and change the time zone to Beijing. (The reason for changing this is because some attachments are uploaded with time name. If the time format is wrong, it will cause the program to report an error)
6. The Chinese name or path used by the uploaded file
If you upload without components using ASP, because Chinese is not supported, you need to check whether Chinese is included on the upload path.
7. Report "Microsoft VBScript runtime error '800a0005' Invalid procedure call or parameter: 'chr'" error (My problem belongs to this kind of problem)
Microsoft VBScript runtime error '800a0005' Invalid procedure call or argument: 'Chr' /admin/inc/UPLOAD.INC,
line 75 This error may be because the server is in English because the Chr function returns a String containing characters related to the specified character code.