Yesterday to the company server redo system, encountered ASP attachments can not upload, before the server on the use of good, how to redo is not normal, so a google,baidu, the following will solve the solution to help meet the problem of friends less detours:
1, Permissions issues
Make sure that the folder "Guest user" for the file you are uploading has writable permissions, some stored in the database, and permissions 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:
To turn off the IIS Admin service
Open \windows\system32\inesrv\metabase.xml
Modify the value of aspmaxrequestentityallowed for your own needs, default to 204800
Start the IIS Admin Service
After modification, you will also need to modify the Machine.config file
In asp.net, the default size for uploading files is 4096 KB, which is 4M, but you can change this data in Web.config. The more commonly used method is to directly modify the C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG directory Machine.config file (the framework version will be different, you use what version of the version of the directory), look for httpruntime in this row maxRequestLength values to the ideal value, such as 8M, you enter 8192.
3, Chinese system, installation of IIS in English patch
After inspection, found that the customer used before the host is the Chinese version of Windows 2003, later changed to Windows English space, the result is a mistake.
In general, the system upgrades IIS or after the patch is sometimes the same problem, we just add a piece of code before the ASP file
<!--must be fist line in ASP-->
<% @LCID =4100%>
4, language problems
Set the locale to "China" in the Control Panel
5, date, time issues
In the Control Panel, place the regional and language options, and set the time format as: H:MM:SS, and change the time zone to Beijing in the control Panel "date Time". (The reason is changed here, because some attachments are sent up to be named after the time, if the time format is wrong, will cause the program error)
6, upload the file using the Chinese name or path
Using ASP without component upload, because it does not support Chinese, you need to check whether the upload path contains Chinese.
7, "Microsoft VBScript run-time Error error ' 800a0005 ' Invalid procedure call or parameter: ' CHR '" error (my problem belongs to this)
Microsoft VBScript Runtime error ' 800a0005 ' Invalid procedure call or argument: ' Chr '/admin/inc/upload. INC,
Line 75 This error may be in the English version of the server because the CHR function returns a String that contains characters related to the specified character code.
Related syntax: Chr (charcode) The necessary charcode parameter is a Long that is used to identify a character. Note: Numbers between 0 and 31 are the same as standard nonprinting ASCII code.
For example, CHR (10) can return a newline character. The normal range of charcode is 0–255. However, in a DBCS system, the actual range of CharCode is 32768 to 65535. Note: The ChrB function acts on the byte data contained in String. ChrB always returns a single byte instead of returning a character, one character may be one or two bytes. The ChrW function returns a String containing Unicode, which is functionally the same as the CHR function on a platform that does not support Unicode.
So take the AscB of the error Line75 Line code: STEMP=STEMP&CHR (AscW (Upfile_5xsoft_stream.read (1)) &CHRB (c)) to Chr.