Skip to content

Infragistics Community Forum / Web / Ignite UI for jQuery / File upload times out on larger files

File upload times out on larger files

New Discussion
Randy Craven
Randy Craven asked on Jun 18, 2013 3:46 PM

Hello,

My MVC4 project uses an igUpload control for images and videos.  With files larger than 10MB the upload will typically stop at some point and I have to cancel.

Obviously there are multiple points where this failure could occur so at this point I am looking for advice about where to start looking for the problem.  I have tried different computers in different locations and 10MB seems to be about the largest file that will upload.

 

I have modified my web.config file to allow uploads up to 100MB (using the maxFileSizeLimit key).

Attached is a screen shot from a failed upload.  In the lower left is another upload counter of some kind, I suppose from the browser.  The igUpload has stalled at about 75% but the other counter continues (and would get to 100% though this screen shot was taken at 97%).  I have no idea what that means!

Thanks for any advice!

Randy

 

 

 

Sign In to post a reply

Replies

  • 0
    Alex E
    Alex E answered on Jun 7, 2013 8:12 AM

    Hello Randy,

    Normally there should be no reason caused by the control itself that may lead to limit files upload size when it is set correctly in upload settings. The main possibilities for such behavior may be IIS settings or Firewall/Security software that may prevent copying of such files. There may be also some OS related security settings (applied to upload folder or by default) that may prevent copying files with such size. Timeout itself can be caused by slow connection or too many connections made at the same time.

    Note that IIS Server by default sets file size limit which can also cause issues when large files are uploaded.

    Check these possibilities and update me with your findings.

    • 0
      Randy Craven
      Randy Craven answered on Jun 17, 2013 3:37 PM

      Thank You, Alex.

      I will check with my ISP to see if they can help.

      In the meantime I would like to ask about trapping the onError event in the igUpload control.  When the upload times out I am not able to display an error to the user and end the upload gracefully.

      I have the following code to trap the error located in my igUpload initializer:

          onError: function (evt, ui) {        

      var errorString = ui.errorMessage + ' (code=' + ui.errorCode + ', type=' + ui.errorType;        

       if (ui.ServerMessage != null) {             errorString += ' – ' + ui.ServerMessage ;         }        

       errorString += ')';        

      console.log('video upload error: ' + errorString);        

      $("#videoUploadError").html(errorString); 

      },

       

      What happens in my situation is that this code never fires, the fileUploading event just continues to fire with the uploadedBytes total remaining the same.  I have attached a screen shot of this.

      Eventually, a server side error will be thrown:

      System.Web.HttpException (0x80004005): Request timed out.

      However, the fileUploading event continues to fire on the igUpload even after that.  You can see this in the screen shot as well.

      Do you have a suggestion as to how I can trap the onError event and end the upload when it times out?

      Thank You,

      Randy

       

       

    • 0
      Randy Craven
      Randy Craven answered on Jun 17, 2013 8:11 PM

      Hello Alex,

      I did figure out how to prevent the timeout during larger uploads, it was by adding this line to the system.web section of my web.config:

          <httpRuntime requestValidationMode="4.5" maxRequestLength="102400" executionTimeout="1800" />   

      In this case, a file size of 100MB is allowed with 30 minutes allowed before the httpException is thrown.

      It would still be very useful to be able to trap the timeout when it occurs.  Do you have any suggestions about that?

      Thank You,

      Randy

      • 0
        Alex E
        Alex E answered on Jun 18, 2013 3:39 PM

        Hello Randy,

        Normally “onError” event is fired when exception occurs on Server or Client. In the mentioned situation there is no exception thrown until the Server itself does not time out.

        One possibility is to monitor the upload status and set JavaScript timeout or counter in uploading event that will cancel the upload after reached time limit.

        You can monitor these with “fileStatus” argument in uploading event.

      • 0
        Randy Craven
        Randy Craven answered on Jun 18, 2013 3:46 PM

        Thank you for your help, Alex! 

        This gives me what I need to know to handle the error.

        Randy

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Randy Craven
Favorites
0
Replies
5
Created On
Jun 18, 2013
Last Post
12 years, 8 months ago

Suggested Discussions

Created by

Created on

Jun 18, 2013 3:46 PM

Last activity on

Feb 24, 2026 9:21 AM