Where is the setting for Maximum size of post data

I have a need to upload large files. When I was on ACF I edited the IIS so that the web.config had a high enough setting by having an entry for requestLimits maxAllowedContentLength I then found that I also had to change a setting in ACF for Maximum size of post data which I found in the administrator settings.

I have the same IIS settings (the server was cloned and the web.config is the same), but the files will no longer upload. I’m presuming that although the message is pointing the blame at IIS with the message below. I don’t see how it can be IIS when I have the same settings.

With that being said I can’t find Maximum size of post data in the Lucee administrator. Could anybody point me in the right direction to increase the allowed post data size?

IIS Web Processing Exception (500):

Maximum request length exceeded.
For maximum request size limit errors please have administrator adjust maxRequestLength and/or maxAllowedContentLength.


  • Windows Server 2022
  • IIS 10
  • Java 11.0.21
  • Tomcat Version 9.0
  • Lucee
  • MS SQL 2022

This is a IIS error. Thus, I’d bet that the settings you have defined in your web.config is not being honoured. Have you tried checking/setting those values from within your IIS manager?

I agree it looks like IIS, but I am not 100% convinced, as I had the same issue in ACF, once I changed the setting in ACF it was fine.

Either way, I went to IIS and changed the setting, making it smaller and then back up to larger again so it would accept up to 100000000byte, so just under 100meg and restarted the server. The web.config looks the same as it did before however it did behave a little differently.

Now what happens is that it just hangs, I tried to upload an MP3, which was just 5meg and it won’t take it, it hangs for a few minutes then the page times out (tried adding requesttimeout to the URL but didn’t help). If I upload a small image it’s fine.

This did work fine on ACF.

A little stuck on this one :frowning:

after I changed it back and forwards, it’s actually gone back to just rejected it. I tried it again on ACF and it’s uploading the file in about 5 seconds, but the Lucee server is now rejecting it as too large in about the same time.

IIS looks okay. As I mentioned, the server was actually cloned, so I have the same IIS settings and web.config that did work.

Is there any way to tweak the max allowed in Lucee like you can in ACF?

I found the issue

In IIS if I go to REQUEST FILTERINGEDIT FEATURE SETTINGS and I change the MAXIMUM ALLOWED CONENT LENGTH to 400000000 bytes it will add a setting to my web.config file

        <requestFiltering allowDoubleEscaping="true" removeServerHeader="true">
            <requestLimits maxAllowedContentLength="400000000" />

In ACF that’s all you need and it works from the IIS side, although I also have to go into the ACF administrator - SETTINGS → and adjust Maximum size of post data to match

Now, in Lucee, that does not work.

The solution is to add another entry into the web.config

    <httpRuntime maxRequestLength="390625" /> <!-- Set the value in kilobytes -->

I could not find any way to get IIS to add this entry from its GUI, I had to manually add it, so I’m not 100% sure if it will be removed if I change anything using the GUI that changes the web.config, I’ll need to test that.

Anyway, once that extra line was added in, IIS now accepts the large file sizes.

You can get to this setting in IIS GUI (and a bunch of others) but you have to click on the top level server in left hand nav, then in the “content” area at the bottom under “Management” is “Configuration Editor”.

With that open, navigate to different sections using the top dropdown
(e.g. “system.web/httpRuntime” )and you’ll see all the properties listed.

Just like @ebrewer said, you can change this setting within your IIS. If you need to find it, just look at this thread. You just need to go to the correct setting/path for your setting

1 Like

ahh thanks @ebrewer @andreas I would never have found that! I’ve changed that now so any further changes don’t change my web.config back to default.

Odd how ACF didn’t seem to care, oh well, it’s working now. Thanks again for the help, much appreciated.

AFC has a lot of fudge factor under the hood.

Keep in mind that AFC migrated from Jrun, which they added a lot of fixes, for bad coding practices that just worked under jRUN.

Glad I am moving away from it! :slight_smile:

So far I’ve found that Lucee supports webp image types so I’ve been able to upload and read their dimensions, I had to block their use in ACF

It can store sessions in a database so I can update/reboot the server and nobody gets kicked out of their session with it running in memory.

So the move is also solving some additional pain points that I had with CF, not to mention the cost :slight_smile:

There was a third thing it could do that ACF could not do but I can’t remember what it was

As a side note, you can use a windows command line tool “appcmd.exe” to pull IIS config data (i have this built into a “Site Config Checker” page in my application)

<cfset outStr = "">
	<cfexecute name = "C:\Windows\System32\inetsrv\appcmd.exe"
		arguments = "list config -section:httpRuntime /text:maxRequestLength"
		variable = "iisMaxReqLen"
		timeout = "5"/>
	<cfset outStr = "IIS .NET Max: #iisMaxReqLen# (KILOBYTES) #(iisMaxReqLen / 1000)# (MB)">
		<cfset outStr = "Failed calling appcmd.exe">
1 Like

Are you saying that changes are not applied to your web.config? This really can’t be. Are you making the changes on a global or local (site) manner?

The global changes don’t change the sites web.config at all.

If I change that a site level it changes the maxAllowedContentLength but has no impact on httpRuntime maxRequestLength=“390625” the only way I can change that is to manually change it.

The concern is it’ll disappear if I change other things in IIS. Which it looks like it actually did. I dropped it back in and will be mindful of that