Home
english
Home
WebDAV Server
WebDAV Client
WebDAV AJAX
Map Drive
Pricing
News
Contacts
info@ithit.com



Uploading Large Files to IIS / ASP.NET

All information in this article is specific to IIS / ASP.NET. HttpListener-based server does not have any limitations listed below.

Upload Content Buffering

The file upload is performed differently in HttpListener application and in IIS/ASP.NET application. While HttpListener passes file content directly to the engine, IIS / ASP.NET first saves file content in a temporary folder limiting upload capabilities and increasing server load. To avoid upload buffering on servers side the IT Hit WebDAV Server Engine provides ResumableUploadModule that also significantly improves upload speed. To use the module in your web application add it to httpModules section in web.config:

 

<httpModules>

    <add name="ResumableUploadModule" type="ITHit.WebDAV.Server.ResumableUpload.ResumableUploadModule, ITHit.WebDAV.Server" />

</httpModules>

Note: Always use Engine.Run(HttpContext) overloaded method when utilizing this module.

Max Upload File Size

While IT Hit WebDAV server engine can process files of any size (up to 8,589,934,592 Gb) the hosting environment or you WebDAV client may not support large files upload. If you host your WebDAV server in IIS/ASP.NET you must specify the file maximum upload size in web.config of your web application. By default maximum upload size is set to 4096 KB (4 MB) by ASP.NET. To increase the upload limit add httpRuntime section to your web application web.config file and specify the limit in kilobytes:

 

<httpRuntime maxRequestLength="2097151" /> <!-- maximum 2Gb for asp.net -->

 

The maximum size you can set in ASP.NET is 2097151Kb = 2Gb. If you need to upload files larger than 2Gb you must implement resumable upload interfaces and upload files with segments. Note that you will need the WebDAV client application that supports resumable upload in this case, such as based on IT Hit WebDAV Client API for .NET.

Upload Timeout

To prevent canceling script execution when uploading a large file to IIS/ASP.NET you must extend script timeout value:

 

HttpContext.Current.Server.ScriptTimeout = 2400; // timeout in seconds.

 

Note that often timeout may be caused by a database connection timeout, if you store your data in a database verify your db connection settings.


What WebDAV software would you like to have?

Selected Customers:
Country: Norway
DnB NOR Group
Country: Finland
Bank of Finland
Country: United Kingdom
Bechtle Direct
Country: Sweden
BT Industries
Country: USA
California Chamber of Commerce
Country: Denmark
Danfoss Group
Country: Denmark
DFDS
Country: USA
Fluke Networks
Country: USA
HNI Corporation
Country: USA
IHS Inc
Country: USA
LandAmerica Financial Group
Country: Canada
Laurentian University
Country: USA
Microsoft
Country: Israel
RADVISION
Country: Ukraine
Raiffeisen Bank
Country: Netherlands
Sanoma Uitgevers
Country: USA
Siemens
Country: Australia
WorkCover NSW
Country: Ukraine
OTP Bank
Country: USA
Intel Corporation
Country: Austria
Austrian Federal Railways
Home WebDAV Server WebDAV Client WebDAV AJAX Map Drive Pricing News Contacts

Updated: Friday, November 14, 2008