MultiFileUploader stuck at 100%

Rushi S asked on February 21, 2018 18:46

We have a Kentico instance hosted on Azure. This issue started occurring last week (no changes were made to the site). When trying to upload an image to the Form choosing the MultiFileUploader, I can choose the file but then it tells me 100% and I'm unable to actually see the file uploaded.

I did a network trace and I see that there is a 404 occurring on MultiFileUploader.js

GetResource.ashx?scriptmodule=/AdminControls/MultiFileUploader.js:1

b @ GetResource.ashx?scriptmodule=/AdminControls/MultiFileUploader.js:1 i.onloadend @ GetResource.ashx?scriptmodule=/AdminControls/MultiFileUploader.js:1 XMLHttpRequest.send (async) w @ GetResource.ashx?scriptmodule=/AdminControls/MultiFileUploader.js:1 e.onchange @ GetResource.ashx?scriptmodule=/AdminControls/MultiFileUploader.js:1

This occurs in both IE and Chrome. Kentico version v10.0.36.

Correct Answer

Juraj Ondrus answered on February 28, 2018 07:22

Could you please add the part as mentioned in my previous post? Without the setting for the query string length - as the length for the file uploader can be longer and also without the header? I also assume the request filtering is enabled in your IIS. Just:

<system.webServer>
        <security>
            <requestFiltering>
              <requestLimits maxAllowedContentLength="9096648" />
            </requestFiltering>
        </security>
    </system.webServer>
0 votesVote for this answer Unmark Correct answer

Recent Answers


Juraj Ondrus answered on February 22, 2018 10:11

Hi,
What version of Kentico are you using and how big is the file? If it is a bigger file, what are the request limits set in the request filtering? The issue seems to be related to this article

0 votesVote for this answer Mark as a Correct answer

Rushi S answered on February 22, 2018 14:38

Hi Juraj,

The file size is only 28KB. The version of Kentico I believe is 10.0.36. There is plenty of storage available.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on February 23, 2018 09:46

Thanks, still I would double check the request limits and request filtering settings. 404 error is usually result of these not set correctly. Then, what is your exact azure setup? Azure cloud services or web apps? How was the project deployed?

0 votesVote for this answer Mark as a Correct answer

Rushi S answered on February 23, 2018 14:54

maxRequestLength:

    <httpRuntime maxRequestLength="2097151" waitChangeNotification="1" maxWaitChangeNotification="3600" requestValidationMode="2.0" maxUrlLength="1000" targetFramework="4.5" />

Regarding maxAllowedContentLength, I do not see that anywhere in the web.config. There 2 lines with this mentioned, but they are both commented out.

The Kentico instance is running as an app service (Size: S2 Standard) in Azure. I wasn't involved in the development and deployment of the project, so I'm not sure how it was deployed.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on February 27, 2018 07:43

Have you tried adding the request filtering size as mentioned in the article I linked in my first message? Do not get confused with existing one, as mentioned in the article,it applies for WebDav, you need to add that element to the main system.webServer element:

<system.webServer>
        <security>
            <requestFiltering>
              <requestLimits maxAllowedContentLength="9096648" />
            </requestFiltering>
        </security>
    </system.webServer>
0 votesVote for this answer Mark as a Correct answer

Rushi S answered on February 27, 2018 16:41

I tried it just now, it does not appear to fix the problem. I added maxAllowedContentLength to the request limits line.

 <system.webServer>
<modules runAllManagedModulesForAllRequests="true">
  <remove name="WebDAVModule" />
  <remove name="XHtmlModule" />
  <remove name="CMSApplicationModule" />
  <add name="XHtmlModule" type="CMS.OutputFilter.OutputFilterModule, CMS.OutputFilter" />
  <add name="CMSApplicationModule" preCondition="managedHandler" type="CMS.Base.ApplicationModule, CMS.Base" />
</modules>
<handlers>
  <remove name="WebDAV" />
  <remove name="ChartImageHandler" />
  <add name="ChartImageHandler" preCondition="integratedMode" verb="*" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>
<staticContent>
  <remove fileExtension=".woff" />
  <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
  <remove fileExtension=".svg" />
  <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
  <remove fileExtension=".nupkg" />
  <mimeMap fileExtension=".nupkg" mimeType="application/zip, application/octet-stream" />
</staticContent>
<security>
  <requestFiltering>
    <requestLimits maxQueryString="1024" maxUrl="2048" maxAllowedContentLength="2147483648" >
      <headerLimits>
        <add header="Content-type" sizeLimit="100" />
      </headerLimits>
    </requestLimits>
    <!-- Disable direct access to these files which are used only internally by CMS application -->
    <denyUrlSequences>
      <add sequence="/CMSTemplates" />
      <add sequence="/CMSPages/PortalTemplate.aspx" />
    </denyUrlSequences>
  </requestFiltering>
</security>
<validation validateIntegratedModeConfiguration="false" />

</system.webServer>

0 votesVote for this answer Mark as a Correct answer

Rushi S answered on February 28, 2018 15:22 (last edited on February 28, 2018 15:22)

I think that did the trick, thanks.

  <security>
  <requestFiltering>
    <requestLimits maxAllowedContentLength="9096648" />
    <!-- Disable direct access to these files which are used only internally by CMS application -->
    <denyUrlSequences>
      <add sequence="/CMSTemplates" />
      <add sequence="/CMSPages/PortalTemplate.aspx" />
    </denyUrlSequences>
  </requestFiltering>
</security>
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.