0

I am doing an asp.net web forms project and trying to implement the jQuery File Upload. I was able to get it working with smaller files but files over 30mb will not upload. The progress bar will appear then just stays at the start like so: enter image description here

In my web.config I have the max request length and max allowed content length set.

<system.web>
  <compilation debug="true" targetFramework="4.5.1" />
  <httpRuntime targetFramework="4.5.1" maxRequestLength="10240000" executionTimeout="1800" />
</system.web>

and

<system.webServer>
  <security>
    <requestFiltering>
      <requestLimits maxAllowedContentLength="4248576000" />
    </requestFiltering>
  </security>
</system.webServer>

I am able to get around this by setting maxChunkSize: 10000000 but when I do this my asp.net is not appending the file correctly. It will only save the last chunk or it locks and says "The process cannot access the file because it is being used by another process."

I am using the FileTransferHandler from this example in the documentation: https://github.com/i-e-b/jQueryFileUpload.Net/blob/master/jQueryFileUpload/FileTransferHandler.ashx.cs

Steve
  • 546
  • 5
  • 18

1 Answers1

0

I'm not an ASP.NET expert, but I believe I have come across something similar in the past and if I remember correctly, you also have to add/edit this on your web.config:

<configuration>
  <system.web>
    <httpRuntime maxRequestLength="xxxxxxxx" />
  </system.web>
</configuration>

This can be the same amount of kB, so 4248576000 if you want. Check what it is set to currently (should be something like 30720 [=30MB] if this is causing your problems...)

Laurens Swart
  • 1,234
  • 9
  • 24
  • maxRequestLength is set to 10240000 – Steve Feb 05 '16 at 15:36
  • Ah sorry I misread. I'm affraid I don't know the answer then... What you could try to do, is use a file generator to generate files of exactly 31457280 bytes, and then 1 byte less and 1 byte more, to see if there is indeed a fixed problem @ 30MB. Then you at least know if it's a setting problem or if it's something else... I've had a similar problem in the past (with PHP though) and I used http://www.fakefilegenerator.com/generate-file.php to try several file sizes, and in the end I managed to find the cause of the problem by searching for the exact amount of bytes that was the limit in my cfg – Laurens Swart Feb 05 '16 at 15:42
  • http://stackoverflow.com/questions/288612/how-to-increase-the-max-upload-file-size-in-asp-net – IrishChieftain Feb 06 '16 at 12:58