RequestLength and/or maxAllowedContentLength IIS7 or Lucee parameter

1,084 views
Skip to first unread message

Pierre Larde

unread,
Mar 7, 2017, 8:38:41 AM3/7/17
to Lucee

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

Then I modify the request filering 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 ?

Thhanks for any help.
Pierre.

Julian Halliwell

unread,
Mar 7, 2017, 8:55:58 AM3/7/17
to lu...@googlegroups.com
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>

Julian.

JP

unread,
Mar 8, 2017, 12:57:24 PM3/8/17
to Lucee
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.)

  1. 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/


  2. IIS – 2 GB Max, 20 hrs


Configuration Editor:

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


https://msdn.microsoft.com/en-us/library/e1f13641(v=vs.85).aspx


http://www.meridianoutpost.com/resources/etools/calculators/calculator-file-download-time.php


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


Pierre Larde

unread,
Mar 13, 2017, 3:04:13 PM3/13/17
to Lucee
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.

Julian Halliwell

unread,
Mar 13, 2017, 3:51:04 PM3/13/17
to lu...@googlegroups.com
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>

Julian.

Pierre Larde

unread,
Mar 13, 2017, 5:23:34 PM3/13/17
to Lucee
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.

Reply all
Reply to author
Forward
0 new messages