RequestLength and/or maxAllowedContentLength IIS7 or Lucee parameter

When uploading a photo of more 4Mb there is an error and message of upload restriction:
RequestLength and/or maxAllowedContentLength to be corrected in IIS7

Then I modify the request filtering parameters in II7 for that site.

And I still have the error message.
So I am wondering if there is a parameter to be modified in Lucee ?

Thanks for any help.
Pierre.

If you’re still getting the IIS error then it sounds like you haven’t
configured it correctly.

It should be something like this in your site’s web.config

 <system.web>
  <httpRuntime maxRequestLength="10240" />
</system.web>

In order to do large file uploads, you will need to tweak the following
settings (the following allows uploads up to 2GB with a max timeout of 20
hrs.)

Edit C:\lucee\tomcat\conf\server.xml
Edit <Connector port="8888" /> element, add attributes:
connectionUploadTimeout="72000000" (MS = 20 HRS)
disableUploadTimeout="false"

http://somepixels.net/en/502-proxy-error-uploading-from-apache-mod_proxy-to-tomcat-7/

IIS – 2 GB Max, 20 hrs
Configuration Editor:

system.web/httpRuntime
executionTimeout: 20:00:00 (20 HRS)
maxRequestLength: 2000000 (in KB) = 2 GB

Request Filtering → edit feature setting
Maximum allowed content length: 2000000000 (Bytes) = 2 GB

http://www.web-site-scripts.com/knowledge-base/article/AA-00696/0/Increasing-maximum-allowed-size-for-uploads-on-IIS7.html

OK, thanks, I found it and it works. Thanks a lot.

I found the file : and it has the following code:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="50000000" 
maxUrl="10096" />
            </requestFiltering>
        </security>
    </system.webServer>
</configuration>

Which correspond to the IIS7 request filter window.

I added lines , and it looks like this now :

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="50000000" 
maxUrl="10096" />
            </requestFiltering>
        </security>
    </system.webServer>
    <system.web>
        <httpRuntime maxRequestLength="15360" ></httpRuntime> 
    </system.web>
</configuration>

It does work, great.

(maybe, the lines with <system.webserver> are not necessary ?)
Pierre.

Thanks for help,

I tried to add:

connectionUploadTimeout="900000"
disableUploadTimeout="false

in server.xml

I checked IIS site : the max is the default : 30 Mb

I still have the same error message :

IIS Web Processing Exception (500):------------------------------
Longueur maximale de la demande dépassée.
For maximum request size limit errors please have administrator adjust 
maxRequestLength and/or maxAllowedContentLength.

And the same upload on local environment have no error.

Tomcat/Lucce server.xml is the default file parameters.

Is that a IIS7 error or a Lucee/Tomcat error ?

And, where is located the IIS7 file (system.web) which can be updated ?

Thanks for any help.

That will be an IIS error.

system.web is not the name of a file, it’s an XML element in which the
setting needs to go.

The file containing the settings XML is called web.config and should
be in your site’s web root. If not, you could create it and make sure
it contains the following (the maxRequestLength value should be the
maximum size in KB you want to allow).

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.web>
        <httpRuntime maxRequestLength="10240" /><!-- 10MB -->
    </system.web>
</configuration>
1 Like