I Love Stackoverflow
I Love Stackoverflow

Reputation: 6868

Web.config settings not working to accept file size with more than 1 gb

I am trying to upload csv file with size 1.10 gb and i would like to allow user to upload file up to size 10 gb.

Web.config settings :

<system.web>
    <authentication mode="None" />
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime maxRequestLength="10240000" targetFramework="4.5" /> <!-- this will file upload up to 10 gb-->
  </system.web>
 <system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="10240000" /><!-- iis setting to handle file upload up to 10 gb-->
      </requestFiltering>
    </security>
    <modules>
      <remove name="FormsAuthentication" />
    </modules>
  </system.webServer>

Error:enter image description here

Above settings are based on this reference.

I am using ng-File Upload to upload file to server.

Upvotes: 3

Views: 1705

Answers (2)

Ahmar
Ahmar

Reputation: 3867

You can set it to 3.99 GB max. According to MSDN maxAllowedContentLength has type uint, its maximum value is 4,294,967,295 bytes = 3.99 GB

Upvotes: 2

hasnayn
hasnayn

Reputation: 356

Increase the value of maxAllowedContentLength. Maximum value of maxAllowedContentLength is 4,294,967,295 bytes = 3,99 gb.

Upvotes: 3

Related Questions