AlanTsai
4/11/2016 - 1:52 AM

Change asp .net website file upload size to 50MB #asp.net #asp.net-mvc

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>