How to configure IIS to upload files larger than 100MB (default setup configuration)

Coordinator
Nov 27, 2008 at 2:33 PM
Edited Dec 3, 2008 at 9:03 AM
IIS and ASP.NET include several settings which  you may have to configure in order to upload/post large files.

First let's cover what the Velodoc XP Edition setup does for you:
  1. On IIS5 and IIS6, in the httpRuntime section of the application web.config file, the setup sets a large value for executionTimeout and maxRequestLength. To understand and modify these settings please refer to http://msdn.microsoft.com/en-us/library/e1f13641.aspx.
  2. On IIS7, in the requestLimits section of the application web.config file, the setup sets a large value maxAllowedContentLength. To understand and modify these settings please refer to http://msdn.microsoft.com/en-us/library/ms689460.aspx.
  3. Note that if you are implementing sessionState, you need to plan for a large timeout.
Second, let's cover what the Velodoc XP Edition setup is not doing for you, essentially because it affects all applications running on IIS and we like to play in our own back yard:
  1. In the IIS metabase, you may have to consider increasing the values of MaxRequestEntityAllowed, AspMaxRequestEntityAllowed and UploadReadAheadSize. Although these properties essentially relate to ASP applications, they apparently also affect ASP.NET applications as explained here.
  2. In the processModel section of machine.config, you may have to consider increasing the values of  responseDeadlockInterval and responseRestartDeadlockInterval. To understand and modify these settings, please refer to http://msdn.microsoft.com/en-us/library/7w2sway1(VS.71).aspx.
Finally, WCF Services have their own settings. In the following line of web.config, you may have to configure maxReceivedMessageSize, receiveTimeout and sendTimeout:
<binding name="wcfTransferServiceBinding" messageEncoding="Mtom" transferMode="Streamed" maxBufferSize="65536" maxReceivedMessageSize="104857600" receiveTimeout="01:00:00" sendTimeout="00:10:00">

In order to diagnose specific issues, you need to look at the logs, especially the event log, the IIS log and the Http Error log as described in http://support.microsoft.com/?id=820729.

For more details, I recommend reading Improving .NET Application Performance and Scalability.
Coordinator
Jan 30, 2009 at 11:50 AM
For versions of Windows prior to Windows Vista and Windows Server 2008, also consider configuring TCP Receive Window Size and Window Scaling