Ajax Upload of Files Over 2Gb to IIS

Internet Information Server (IIS) does not support upload of files over 2Gb in one piece. To overcome this limitation Ajax File Browser breaks a file to segments and uploads file segment-by-segment. It automatically detects that your WebDAV server is IIS-based and breaks file to 2Gb segments.

By default the maximum upload segment size allowed by ASP.NET is  4096 KB (4 MB). To upload files of unlimited size set it to 2Gb in web.config:

    <!-- Maximum upload file segment size in Kb, max 2097151 (2Gb) for asp.net. -->
    <httpRuntime executionTimeout="2400" maxRequestLength="2097151" />

        <!-- Maximum upload file segment size in bytes is 2147483648 (2Gb) for IIS 7 and later / asp.net. -->
        <requestLimits maxAllowedContentLength="2147483648"/>

For any non-IIS based WebDAV servers, by default, files are uploaded in a single segment regardless of the file size. To break file into segments regardless of server type use the following setting:

MaxUploadSegmentBytes – Sets the file upload segment size in bytes. By default -1, means the file is broken to 2Gb segments only in case of IIS.


Next Article:

Auto-Restore Broken File Uploads