Upload File with big size fails in igUpload

507 views Asked by At

I am using igUpload from Infragistics to upload multiple files. Everything works fine when the file size is less than 3 MB but when i try to upload a file with bigger size, it fails and returns this error

Could not get your current file status! Probably connection dropped

I also changed the uploadUtilsBufferSize to 10485760 but still nothing works for bigger files. Following is the configuration for igUplaod

Button.igUpload({
    mode: 'multiple',
    multipleFiles: true,
    AutoStartUpload: false,
    progressUrl: "IGUploadStatusHandler.ashx",
    controlId: "upload1",
    labelUploadButton: "Upload",
    onError: function(evt, ui) {
        if (ui.errorType == "serverside") {
            ErrorMessage.append("<p>" + ui.serverMessage + "</p>");
        } else if (ui.errorType == "clientside") {
            ErrorMessage.append("<p>" + ui.errorMessage + "</p>");
        }
    }
});
2

There are 2 answers

0
Martin Pavlov On BEST ANSWER

There is a maximum request length limit on the IIS web server. For IIS 6 it is 4 MB (details here). For IIS 7 and newer is 28.6 MB (details here).

Depending of what version of IIS you're using try the following settings in the web.config:

IIS 6 (web.config):

<system.web>
    <httpHandlers>
         <add verb="GET" type="Infragistics.Web.Mvc.UploadStatusHandler" 
                         path="IGUploadStatusHandler.ashx" />
    </httpHandlers>
    <httpModules>
        <add name="IGUploadModule" type="Infragistics.Web.Mvc.UploadModule" />
    </httpModules>
    <!--OPTIONAL: Set the maximum request length.
    By default the request lenght is 4 MB.
    More info: http://msdn.microsoft.com/en-us/library/e1f13641(v=vs.85).aspx-->
    <httpRuntime executionTimeout="3600" maxRequestLength="2097151000"/>
</system.web>

IIS 7 (and later) (web.config):

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
        <add name="IGUploadModule" type="Infragistics.Web.Mvc.UploadModule" 
                                   preCondition="managedHandler" />
    </modules>
    <handlers>
        <add name="IGUploadStatusHandler" path="IGUploadStatusHandler.ashx" verb="*"
            type="Infragistics.Web.Mvc.UploadStatusHandler" preCondition="integratedMode" />
   </handlers>    
   <security>      
        <requestFiltering>    
            <!--OPTIONAL: Set the maximum request length.
            By default the request lenght is ~30 MB.
            More info: http://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits-->
            <requestLimits maxAllowedContentLength="2097151000"/>
      </requestFiltering>    
   </security>
</system.webServer>

P.S.: This information is documented in the Ignite UI help here.

0
Mike On

I also got this message when the Directory I was attempting to upload to did not have sufficient privileges for the IIS user configured. In my case granting IIS_IUSR write permission on the folder resolved my issue.