Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alantsai/ddf4e7c606f0f698c49654bc6454f9ff to your computer and use it in GitHub Desktop.
Save alantsai/ddf4e7c606f0f698c49654bc6454f9ff to your computer and use it in GitHub Desktop.
Change asp .net website file upload size to 50MB #asp.net #asp.net-mvc

In the webconfig, add following two:

More Info

<configuration>
  <system.web>
    <!--unit in kb-->
    <!-- default 4096 -> 4MB -->
    <httpRuntime maxRequestLength="50000" /> <!--so this will be 50MB -->
  </system.web>
</configuration>

This is setting the iis

More Info

  <system.webServer>
    <security>
      <requestFiltering>
        <!-- unit in byte-->
        <!-- default 30000000, which is approximately 28.6MB -->
        <requestLimits maxAllowedContentLength="52428800" /> <!--50MB-->
      </requestFiltering>
    </security>
  </system.webServer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment