Click or drag to resize

Optional Upload Configuration

FileUltimate does not depend on any Web.config settings to work (it's config-free for easy deployment). However for some cases (e.g. supporting legacy Html4 browsers), you may want to change request limits for uploads.

Currently all upload methods except Html4 uses chunked uploading (Html5 or Flash or Silverlight), this is because Html4 cannot split into chunks and can only send the whole file in a single request (multipart/form-data).

In chunked uploading mode, which is the default mode on modern browsers, file is split into chunks and uploaded one by one, and then reassembled back on the server. The reason for using chunked uploading when possible, is to overcome server's default request limitations. By using chunking, normally you don't need to change any settings to allow uploading of very large files out of the box.

Information on various request limits:

  • ASP.NET Classic by default has 4096 (4 MB) request limit, controlled by system.web/httpRuntime/maxRequestLength property in Web.Config, in kilobytes, maximum value is 2097151 (1,99 GB). This setting effects FileUploader only if you are running under server runtime lower than ASP.NET Classic 4.5 version, i.e when FileUploader cannot automatically override it.

  • ASP.NET Core by default has 30000000 (28.6 MB) request limit, controlled by IHttpMaxRequestBodySizeFeature.MaxRequestBodySize property in code, in bytes, maximum value is unlimited if null. This setting does not effect FileUploader, i.e FileUploader can automatically override it.

  • IIS by default has 30000000 (28.6 MB) request limit, controlled by system.webServer/requestLimits/maxAllowedContentLength property in Web.Config, in bytes, maximum value is 4294967295 (3,99 GB). This setting effects FileUploader, as it is an IIS setting, FileUploader cannot automatically override it.

Chunked upload configuration

The default and highest value for FileUploaderChunkSize is determined from system.webServer/requestLimits/maxAllowedContentLength property in Web.Config and is usually 28.6 MB. FileUploader automatically overrides runtime request limits for ASP.NET Classic 4.5+ and ASP.NET Core but it's limited by IIS (system.webServer) request limits.

For example if you need to change default and highest value for FileUploaderChunkSize for some reason (e.g. from 28.6 MB to 100 MB), edit your project's Web.config file and add the following settings inside <configuration> tag:

XML
<!-- This setting increases the request limits only for the specified path and not whole application -->
<location path="fileuploader.ashx/UploadAsBinary">
  <system.webServer>
    <security>
      <requestFiltering>
        <!-- 
          maxAllowedContentLength is in bytes, default value is 30000000 (28.6 MB), maximum value is 4294967295 (3,99 GB).
          This setting effects FileUploader, as it is an IIS setting, FileUploader cannot automatically override it.
        -->
        <requestLimits maxAllowedContentLength="104857600"/>
      </requestFiltering>
    </security>
  </system.webServer>
</location>
Note Note

ASP.NET Core does not support paths other than root for location tag (can cause HTTP 404 error when the path is requested) so you need to use <location path="."> for ASP.NET Core.

Note Note

For ASP.NET Classic (WebForms and MVC) running under server runtime lower than .NET 4.5 version (not target framework but the installed runtime version on the server), you will also need this setting:

XML
<!-- This setting increases the request limits only for the specified path and not whole application -->
<location path="fileuploader.ashx/UploadAsBinary">
  <system.web>
    <!-- 
      maxRequestLength is in kilobytes, default value is 4096 (4 MB), maximum value is 2097151 (1,99 GB).
      This setting effects FileUploader only if you are running under server runtime lower than ASP.NET Classic 4.5 version, 
      i.e when FileUploader cannot automatically override it.
    -->
    <httpRuntime maxRequestLength="102400"/>
  </system.web>
</location>
Form upload configuration

If you want to support the lowest level upload method Html4 which is the only possible method for old browsers without Html5 or Flash or Silverlight support, then you will need to increase the request limits so that you can upload files larger than 4MB and 28.6 MB on these browsers. Html4 upload method requires the limits to be set to the maximum possible value as it sends the whole file in a single request (multipart/form-data). Other upload methods use chunking so there is no upper limit for them.

Edit your project's Web.config file and add the following settings inside <configuration> tag:

XML
<!-- This setting increases the request limits only for the specified path and not whole application -->
<location path="fileuploader.ashx/UploadAsForm">
  <system.webServer>
    <security>
      <requestFiltering>
        <!-- 
          maxAllowedContentLength is in bytes, default value is 30000000 (28.6 MB), maximum value is 4294967295 (3,99 GB).
          This setting effects FileUploader, as it is an IIS setting, FileUploader cannot automatically override it.
        -->
        <requestLimits maxAllowedContentLength="4294967295"/>
      </requestFiltering>
    </security>
  </system.webServer>
</location>
Note Note

ASP.NET Core does not support paths other than root for location tag (can cause HTTP 404 error when the path is requested) so you need to use <location path="."> for ASP.NET Core.

Note Note

For ASP.NET Classic (WebForms and MVC) running under server runtime lower than .NET 4.5 version (not target framework but the installed runtime version on the server), you will also need this setting:

XML
<!-- This setting increases the request limits only for the specified path and not whole application -->
<location path="fileuploader.ashx/UploadAsForm">
  <system.web>
    <!-- 
      maxRequestLength is in kilobytes, default value is 4096 (4 MB), maximum value is 2097151 (1,99 GB).
      This setting effects FileUploader only if you are running under server runtime lower than ASP.NET Classic 4.5 version, 
      i.e when FileUploader cannot automatically override it.
    -->
    <httpRuntime maxRequestLength="2097151"/>
  </system.web>
</location>