Uploadify for ASP.NET application returns HTTP error for large files

My Uploadify script works fine for most files smaller than 10 MB. But as soon as the file size starts to exceed 40 MB, it will not be able to download only the "HTTP Error" error message. I tried implementing the onError handler for Uploadify, but it does not give me any details about the exact error. The variable is returned as "undefined". I checked the web.config file and the file size limit is set to 50 MB, and I have a timeout of 30 minutes, so I'm at a loss as a problem. Here is my script:

$('#uploader').uploadify({ 'uploader': '/js/uploadify/uploadify.swf', 'script': '/cms/common/uploadify/UploadHandler.ashx', 'cancelImg': '/images/cancel_upload.png', 'buttonImg': '/images/select_video_thumbnail_en-us.gif', 'auto': true, 'folder': '/Temp', 'multi': false, 'sizeLimit': 0, 'displayData': 'percentage', 'simUploadLimit': 1, 'fileExt': '*.jpg;*.gif;*.png', 'fileDesc': '*.jpg;*.gif;*.png', 'buttonText': 'Select thumbnail...', 'width': '120', 'height': '24', 'onComplete': function (e, queueId, fileObj, response, data) { return true; }, 'onError': function (a, b, c, d) { if (d.status == 404) alert('Could not find upload script.'); else if (d.type === "HTTP") alert('error ' + d.type + ": " + d.status); else if (d.type === "File Size") alert(c.name + ' ' + d.type + ' Limit: ' + Math.round(d.sizeLimit / 1024) + 'KB'); else alert('error ' + d.type + ": " + d.text); }, 'onCancel': function (e, queueId, fileObj, data) { } }); 
+4
source share
2 answers

IIS7, which I run, has a default limit for an internal file of 30 MB in size. Setting maxRequestLength more than that will not help. The problem is resolved by adding the following content to the web.config file:

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

It can also be installed in IIS7. For more information, see the following links: IIS7 File Upload Size Limits Enabling Request Filtering in IIS 7

+3
source

Add your tag to the add function.

 'sizeLimit': '10045728' 

This will work for you. Size Limit - This is the file size limit. He is in KB.

0
source

All Articles