Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Chris Norwood 104 posts 571 karma points
    Jan 18, 2018 @ 10:08
    Chris Norwood

    Can't upload media files in one environment - 413 Request Entity Too Large (sometimes)

    We're using Umbraco 7.7.1; in one of our environments we don't seem to be able to upload any media files over about ~50kb.

    The config (max request length, max file size etc). is the same for all environments, and set to around 52MB.

    However, on this one environment when I look at the call to PostAddFile in Firefox dev tools it shows the data being sent as HTML rather than JSON (but only if the file is over a certain size - below about 48kb ish it seems to be fine).

    On the other environments the type is always JSON, regardless of the size (see below).

    The site that's not working is on SSL whereas the dev site isn't, but the live site is also on SSL (on the same machine, with a more or less identical config) and that seems to work.

    For the admin2 site, the status code sometimes comes back as "413 - Request Entity Too Large"; I've done some research on this but I can't see why the POST would be sending HTML rather than JSON?!

    We can transfer data from the dev site to the UAT site using Courier, but we want the client to be able to use UAT so they can get sign off for articles from their execs etc. before pushing the content live.

    Image below - admin2 is the one with the problem:

    Upload Issue

  • Chris Norwood 104 posts 571 karma points
    Jan 18, 2018 @ 11:15
    Chris Norwood

    And once more after I posted I managed to find the answer myself; it appears this is caused by a combination of:

    a) negotiateSSL being set to true in applicationhosts.config

    b) a small " uploadReadAheadSize" value (this is set to 49kb by default but needs to be far larger).

    Instructions for how to fix this are here - note that you do need access to IIS configuration editor to do this and in some cases you might have to amend the applicationhosts.config file to allow overriding settings.

Please Sign in or register to post replies

Write your reply to: