-1

Ok a problem has arisen today with FineUploader, it was working ok yesterday, and nothing has changed for the file upload part of the code.

The site is running on Windows Server 2008 R2, with IIS7 and all the service packs, and is running in MVC .Net 4.5.

The web.config has the required settings:

httpRuntime targetFramework="4.5" maxRequestLength="2147483647" and

requestLimits maxAllowedContentLength="2147483647"

to allow large uploads, and it works on a local machine in Visual Studio no problem.

I can also run it on a local machines IIS and it works perfect also. The only problem is when its run from the actual live website. Unfortunately I cannot give out the live site.

When it fails in FF I get 'XHR returned response code 0'

The code for the uploader (excluding the on error/complete etc.. events) is:

manualuploader = $('#uploader').fineUploader({
    request: {
        endpoint: '/File/UploadFile',
    } });

So I do not limit anything of type/size etc... in the code.

As I say it will work 100% of the time for files under about 350kb, anything over and it always freezes at around the 350-400kb mark (based on the percentage it stops at). After a few minutes it goes to the error call of fineuploader with the XHR 0 code.

It works every time ok in Chrome, works sometimes in IE but sometimes freezing at about 1.5MB and gives same error code, and freezes 100% of the time in FF with that error.

Oh and I don't think its a timeout as it takes about 1 or 2 seconds to get the the 400kb even on a slow connection, and then just hangs before crashing. Any ideas?

Request Header: Accept text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Encoding gzip, deflate Accept-Language en-US,en;q=0.5 Cache-Control no-cache Connection keep-alive Content-Length 1861415 Content-Type multipart/form-data; boundary=---------------------------170602977010532 Cookie __RequestVerificationToken=zL6gveyPJ9FY-KvAQq9xHAdrdKTlezzuzwTXfMLETYbXCgFS9XJKRonvJ7vebBK1f9YCueXq8td33cX_10Xx_hfseiaszXq76PGgCKmHE0M1 Host REMOVED Pragma no-cache Referer REMOVED User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0 X-Requested-With XMLHttpRequest

[FineUploader] Error when attempting to parse xhr response text (SyntaxError: JSON.parse: unexpected end of data)

Then the POST part is this (excluding the garbage at the end which is presumably just the file data):

-----------------------------170602977010532 Content-Disposition: form-data; name="path" null -----------------------------170602977010532 Content-Disposition: form-data; name="qqpartindex" 0 -----------------------------170602977010532 Content-Disposition: form-data; name="qqpartbyteoffset" 0 -----------------------------170602977010532 Content-Disposition: form-data; name="qqchunksize" 1860320 -----------------------------170602977010532 Content-Disposition: form-data; name="qqtotalparts" 1 -----------------------------170602977010532 Content-Disposition: form-data; name="qqtotalfilesize" 1860320 -----------------------------170602977010532 Content-Disposition: form-data; name="qqfilename" 2013-04-21 19.05.30.jpg -----------------------------170602977010532 Content-Disposition: form-data; name="qquuid" e2732d70-3247-4555-bcbd-399aaa471d58 -----------------------------170602977010532 Content-Disposition: form-data; name="qqfile"; filename="blob" Content-Type: application/octet-stream

tereško
  • 58,060
  • 25
  • 98
  • 150
angelsix
  • 392
  • 1
  • 7

1 Answers1

0

Seems pretty clear that this is a server-side issue. Also, you've stated that it worked fine yesterday, so something must have changed in your server-environment. According to the log message, something is likely interfering with the request. You'll need to spend some time looking at your server logs and code and examining any devices between your endpoint and your browser to figure out what is going wrong. Either your endpoint is not properly handling the request or something is interfering with the request before it hits your endpoint code. There's not much help I can offer as I don't know anything about your server environment. You'll need to do some troubleshooting.

Ray Nicholus
  • 19,538
  • 14
  • 59
  • 82
  • I've ported identical code to my other windows server and it works 100% - so yes its server issue. I'll look into it now and report back if I find the answer – angelsix May 01 '13 at 22:09
  • Ok it's not the server, I think its FireFox and IE. I come to try and upload files to eBay using their uploader and got the same problem. I also tried http://blueimp.github.io/jQuery-File-Upload/ and got the same problem! However it is repeatable, a friend in the US can get it to happen, 4 of my PC's get it to happen, and my web host can get it to happen in FireFox and IE... have they recently updated something causing this issue as its further spread than just my machine? – angelsix May 05 '13 at 17:00
  • Oh and I have also now found more out - I can upload to eBay, my site and the other jQuery File Upload site just fine if the client machine is Windows Server 2008 or 2012. However running Windows 7 the sites don't work. FireFox is version 20.0.1 on all machines. The issue also happens on Safari running the latest OSX and all updates. The further confuse things, the server 2008 that all of a sudden got this issue, has had no windows updates since it was setup 3-4 weeks ago either. This is so confusing. – angelsix May 05 '13 at 17:41