Brief overview of work with very large files. ASPForm configuration and IIS setting for huge uploads or urlencoded forms with big fields.
Main idea for big uploads |
---|
Upload components (including ASPNet HTMLInputFile) usually use memory to store temporary upload data. It is a problem, if you are uploading very large files. Huge-ASP upload works with unique hi-performance technology, which lets you read upload source data in small data blocks (Request.BinaryRead) and store the data on temporary disk folder - this is automatic Huge-ASP upload work, of course. You can specify size of a source data block and maximum amount of memory to store data (to store small uploads in memory). For example, HTMLInputFile from ASPNet takes around 5MB of memory to upload 1MB file. You will need at least 500 MB of a free memory if you have 10 clients uploading one 10MB file with ASPNet HTMLInputFile upload control. Huge-ASP upload takes less than 1MB (one megabyte) of memory to do the same action (and 100MB disk size to store temporary data, of course). |
Important points for huge uploads with Huge-ASP upload |
---|
1. Server.ScriptTimeout and ScriptUtils.ASPForm.ReadTimeout property.
Huge-ASP upload has a great performance - it lets you really accept 2GB files in 200second on 100Mb/s Ethernet line. But you have to set ScriptTimeout value to have enough time to transfer data and some time more to process uploaded files on server-side. If you want to accept up to 1GB uploads from min. 256k leased lines, set at least: Server.ScriptTimeout = 40000There is no problem to set a big value for ScriptTimeout - Huge-ASP upload checks client connection during upload and server-side upload process is stopped when client interrupts upload. You can also change this value by some dynamic algorithm with parameter of source form size. For example, on 10Mb/s Ethernet line (real 8000kb/s, 1MB/s): Dim ScriptTimeout, TotalBytes2. ScriptUtils.ASPForm.SizeLimit Size limit Second important value is a ScriptUtils.ASPForm.SizeLimit property. Huge-ASP upload has no limit set by default. It means you can upload and accept any files up to 2GB of size (2^31-1B; Huge-ASP upload can accept up to 4GB, but you will probably not have a client which let's you upload files bigger than 2GB ...). Internet Explorer (from v 5.0) and Netscape Navigator let's you upload files with size up to 2GB also. Be careful to have this value without limit - upload scripts are possible point for DOS attacks. If you have public upload script, set lower value rather. You can also create some dynamic algorithm to limit upload size based on logged on users, local IP addresses, etc. Form.SizeLimit = GetLimitFromDB(LOGON_USER)Please see ScriptUtils.ASPForm.Upload - Monitor and handle upload state/result article to handle "upload size exceeds the limit" state. 3. ScriptUtils.ASPForm.TempPath Temporary
path 4. IIS 6 and
AspMaxRequestEntityAllowed See also: 5. IIS 7 and
maxAllowedContentLength See also: 6. URLScan and other security utilities URLScan has its own limit for POST data. The value name is MaxAllowedContentLength and it is located in WINDOWS\system32\inetsrv\urlscan\urlscan.ini, default value is 30000000 (30MB). You shlould increase the value to process large uploads if you have URLScan on your site. See also MaxAllowedContentLength urlscan. 7. Progress
bar
|
<httpRuntime maxRequestLength="8192" />
Other references |
---|
ScriptUtils.ASPForm.MaxMemoryStorage |
IIS Limit Check is a simple application, which let's you check main IIS parameters important for upload files.
Huge ASP upload is easy to use, hi-performance ASP file upload component with progress bar indicator. This component lets you upload multiple files with size up to 4GB to a disk or a database along with another form fields. Huge ASP file upload is a most featured upload component on a market with competitive price and a great performance . The software has also a free version of asp upload with progress, called Pure asp upload , written in plain VBS, without components (so you do not need to install anything on server). This installation package contains also ScriptUtilities library. Script Utilities lets you create hi-performance log files , works with binary data , you can download multiple files with zip/arj compression, work with INI files and much more with the ASP utility.
© 1996 - 2011 Antonin Foller, Motobit Software | About, Contacts | e-mail: info@pstruh.cz