Web Forms upload guides

Concurrent File Uploads in ASP.NET Web Forms

Suppose a claims form accepts five photos. With three file slots, three photos can start while two wait. A waiting photo takes the next available slot. This is useful when each small request spends part of its time waiting for the server to respond.

Set the number of active files

On a page that already registers the AjaxUploader control, enable multiple selection and set ConcurrentUploads. The example below starts selected files automatically. Use one slot when you want a sequential queue.

<au:AjaxFileUpload ID="ClaimPhotos" runat="server"
        AllowMultiple="true" AutoUpload="true"
        ConcurrentUploads="3" ShowProgress="true" />

The slot count controls simultaneous file transfers in this uploader instance. A visitor can still select a larger batch. A second visitor has a separate queue, so the server can receive requests from both at once.

Measure with the files your users send

Use the same five files for each run. In the concurrent uploads demo, compare one slot with three. Record the time until the first file completes and the time until the whole batch completes. Repeat with a large recording mixed in among the photos. On a connection that already uses its available upload bandwidth, additional slots may only divide that bandwidth among more files.

Account for chunked transfers and save order

If each file also sends chunks in parallel, one active file can generate several requests. Tune file slots and chunk parallelism separately so you can tell which change affected latency or server load. See the large-file upload guide for request-size limits.

A small photo may finish ahead of an earlier, larger one. If photo order matters on the final claim, store a display position with each attachment. Use its upload identifier to associate the response with the right row. The attachment workflow guide covers the later record save.