ASP.NET Upload Frequently Asked Questions

Complete FAQ for file uploading with ASP.NET 1.x-3.5

Introduction

Share this page with friends, or bookmark it for yourself:

This section contains background information about file uploading on the Microsoft platform with ASP.NET and IIS.

» What is the .NET Framework?

» What is ASP.NET?

» What is IIS?

» What is different between ASP.NET versions for uploading?

» How do browsers upload?

» What is the maximum size of an upload?

» What is the .NET Framework?

The .NET Framework is the underlying platform for Microsoft's current suggested coding model. It supports multiple languages, and multiple solution targets (Windows, Web, Services, etc). For more information, look at Microsoft's .NET Framework developer center.

» What is ASP.NET?

ASP.NET is Microsoft's .NET Framework based technology for creating web sites and web applications. For more information, look at Microsoft's ASP.NET developer center.

» What is IIS?

IIS is Microsoft's web server solution. ASP.NET runs inside IIS to provide a dynamic web application solution. For more information, look at Microsoft's IIS site.

» What is different between ASP.NET versions for uploading?

The primary differences are between version 1.x and subsequent (2.0 and on) versions. In 1.0 and 1.1, ASP.NET loads the entirety of all web requests into memory before processing them. Because upload requests are treated like all other requests, the full uploaded file is loaded into memory. This can easily cause scalability and performance problems. Version 2.0 and on implement a disk caching mechanism to solve this issue.

» How do browsers upload?

Browsers use a MIME formatted HTTP POST request to perform uploads. Instead of the default form encoding (enctype) setting of "application/x-www-form-urlencoded", the "multipart/form-data" setting is used. All of the form values, including regular html inputs as well as file html inputs are formatted together in the POST body and sent together. The specification is defined in RFC 1867 [Form-based File Upload in HTML].

» What is the maximum size of an upload?

The RFC doesn't specify a maximum size, so the maximum is limited by IIS and ASP.NET. They can handle uploads of up to 2 GB. For more information on setting this up, see the How to handle larger uploads and avoid timeouts FAQ entry.

SlickUpload ASP.NET Upload Component

SlickUpload

Painless ASP.NET file uploads

  • Handle large files
  • Upload with progress bar
  • Gracefully handle cancellation and errors
  • Stream directly to file or database
  • Drag-drop simple, yet highly customizable
  • Solid, responsive support

» more info | live demo | download