Upload a file in ASP. If the file size exceeds kb, request. binaryread does have a size limit, which can be found in c: \ windows \ system32 \ inetsrv \ metabase. the xml configuration file contains the following fields (my system is 2003): aspmaxrequestentityallowed = "204800"
Here we can see that file upload is restricted. If you want to implement the file request. binaryread (request. totalbytes), it is definitely not feasible. Therefore, you must use the multipart read method.
For example:
Readedbytes = 0
Chunkbytes = 1024*100 '100k multipart upload Scheme
Do While readedbytes <request. totalbytes
Oupfilestream. Write Request. binaryread (chunkbytes)
Readedbytes = readedbytes + chunkbytes
If readedbytes> request. totalbytes then readedbytes = request. totalbytes
Loop
If you use the above upload method, there is no file upload size limit. However, for large files, there is a file timeout phenomenon, so the server must have timed out.
# ASP Column