HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


HTTP Error for very large uploads

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#111493 (In Topic #22411)
TQ
Avatar

Honoured member

Under normal circumstances the uploads work perfectly for me but today I have tried to add a zip files that is 630MB and I receive a message at the completion of the progress bar stating simply: 'HTTP Error' and nothing else.

My PHP and User group limits are both set to 2GB. It IS a valid, uncorrupted ZIP file (I've also recreated it in .7z format).

As I now expect to store files of this size and larger on my server (M$ 2012) I'm wondering if anyone has any suggestions as to why I am receiving this error.

TQ
Back to the top
 
Posted
Rating:
#111494
Avatar

See if this new web.config works:

Code

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
   <system.webServer>
      <rewrite>
         <rules>
            <!--# Redirect away from modules called directly by URL. Helpful as it allows you to "run" a module file in a debugger and still see it running.-->
            <rule name="Imported Rule 1" stopProcessing="true">
               <match url="^([^=]*)webdav.php/([^=]*)pages/(modules|modules_custom)/([^/]*)\.php$" ignoreCase="false" />
               <action type="None" />
            </rule>
            <rule name="Imported Rule 2" stopProcessing="true">
               <match url="^([^=]*)pages/(modules|modules_custom)/([^/]*)\.php$" ignoreCase="false" />
               <action type="Redirect" redirectType="Found" url="{R:1}index.php\?page={R:3}" appendQueryString="true" />
            </rule>

            <!--# These have a specially reduced form (no need to make it too explicit that these are Wiki+)-->
            <!--#   We shouldn't shorten them too much, or the actual zone or base url might conflict-->
            <rule name="Imported Rule 3" stopProcessing="true">
               <match url="^([^=]*)pg/s/([^\&amp;\?]*)/index\.php$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page=cedi&amp;id={R:2}" appendQueryString="true" />
            </rule>

            <!--# These have a specially reduce form (wide is implied)-->
            <rule name="Imported Rule 4" stopProcessing="true">
               <match url="^([^=]*)pg/galleries/image/([^\&amp;\?]*)/index\.php(.*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page=galleries&amp;type=image&amp;id={R:2}&amp;wide=1{R:3}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 5" stopProcessing="true">
               <match url="^([^=]*)pg/galleries/video/([^\&amp;\?]*)/index\.php(.*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page=galleries&amp;type=video&amp;id={R:2}&amp;wide=1{R:3}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 6" stopProcessing="true">
               <match url="^([^=]*)pg/iotds/view/([^\&amp;\?]*)/index\.php(.*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page=iotds&amp;type=view&amp;id={R:2}&amp;wide=1{R:3}" appendQueryString="true" />
            </rule>

            <!--# These are standard patterns-->
            <rule name="Imported Rule 7" stopProcessing="true">
               <match url="^([^=]*)pg/([^/\&amp;\?]*)/([^/\&amp;\?]*)/([^\&amp;\?]*)/index\.php(.*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page={R:2}&amp;type={R:3}&amp;id={R:4}{R:5}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 8" stopProcessing="true">
               <match url="^([^=]*)pg/([^/\&amp;\?]*)/([^/\&amp;\?]*)/index\.php(.*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page={R:2}&amp;type={R:3}{R:4}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 9" stopProcessing="true">
               <match url="^([^=]*)pg/([^/\&amp;\?]*)/index\.php(.*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page={R:2}{R:3}" appendQueryString="true" />
            </rule>
            <!--# This one is weird... apache strips out // and turns to /, thus requiring an extra pattern...-->
            <rule name="Imported Rule 10" stopProcessing="true">
               <match url="^([^=]*)pg/index\.php(.*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page={R:3}" appendQueryString="true" />
            </rule>

            <!--# Now the same, but without any additional parameters (and thus no index.php)-->
            <rule name="Imported Rule 11" stopProcessing="true">
               <match url="^([^=]*)pg/s/([^\&amp;\?]*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page=cedi&amp;id={R:2}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 12" stopProcessing="true">
               <match url="^([^=]*)pg/galleries/image/([^\&amp;\?]*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page=galleries&amp;type=image&amp;id={R:2}&amp;wide=1{R:3}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 13" stopProcessing="true">
               <match url="^([^=]*)pg/galleries/video/([^\&amp;\?]*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page=galleries&amp;type=video&amp;id={R:2}&amp;wide=1{R:3}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 14" stopProcessing="true">
               <match url="^([^=]*)pg/iotds/view/([^\&amp;\?]*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page=iotds&amp;type=view&amp;id={R:2}&amp;wide=1" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 15" stopProcessing="true">
               <match url="^([^=]*)pg/([^/\&amp;\?]*)/([^/\&amp;\?]*)/([^\&amp;\?]*)/$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page={R:2}&amp;type={R:3}&amp;id={R:4}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 16" stopProcessing="true">
               <match url="^([^=]*)pg/([^/\&amp;\?]*)/([^/\&amp;\?]*)/([^\&amp;\?]*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page={R:2}&amp;type={R:3}&amp;id={R:4}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 17" stopProcessing="true">
               <match url="^([^=]*)pg/([^/\&amp;\?]*)/([^/\&amp;\?]*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page={R:2}&amp;type={R:3}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 18" stopProcessing="true">
               <match url="^([^=]*)pg/([^/\&amp;\?]*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?page={R:2}" appendQueryString="true" />
            </rule>

            <!--# And these for those nasty situations where index.php was missing and we couldn't do anything about it (usually due to keep_session creeping into a semi-cached URL)-->
            <rule name="Imported Rule 19" stopProcessing="true">
               <match url="^([^=]*)pg/s/([^\&amp;\?\.]*)&amp;(.*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?{R:3}&amp;page=cedi&amp;id={R:2}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 20" stopProcessing="true">
               <match url="^([^=]*)pg/galleries/image/([^/\&amp;\?\.]*)&amp;(.*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?{R:5}&amp;page=galleries&amp;type=image&amp;id={R:2}&amp;wide=1&amp;{R:3}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 21" stopProcessing="true">
               <match url="^([^=]*)pg/galleries/video/([^/\&amp;\?\.]*)&amp;(.*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?{R:5}&amp;page=galleries&amp;type=video&amp;id={R:2}&amp;wide=1&amp;{R:3}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 22" stopProcessing="true">
               <match url="^([^=]*)pg/iotds/view/([^/\&amp;\?\.]*)&amp;(.*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?{R:3}&amp;page=iotds&amp;type=view&amp;id={R:2}&amp;wide=1" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 23" stopProcessing="true">
               <match url="^([^=]*)pg/([^/\&amp;\?\.]*)/([^/\&amp;\?\.]*)/([^/\&amp;\?\.]*)&amp;(.*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?{R:5}&amp;page={R:2}&amp;type={R:3}&amp;id={R:4}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 24" stopProcessing="true">
               <match url="^([^=]*)pg/([^/\&amp;\?\.]*)/([^/\&amp;\?\.]*)&amp;(.*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?{R:4}&amp;page={R:2}&amp;type={R:3}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 25" stopProcessing="true">
               <match url="^([^=]*)pg/([^/\&amp;\?\.]*)&amp;(.*)$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}index.php\?{R:3}&amp;page={R:2}" appendQueryString="true" />
            </rule>

            <!--# These have a specially reduced form (no need to make it too explicit that these are Wiki+)-->
            <!--#   We shouldn't shorten them too much, or the actual zone or base url might conflict-->
            <rule name="Imported Rule 26" stopProcessing="true">
               <match url="^(site|forum|adminzone|cms|collaboration)/s/([^\&amp;\?]*)\.htm(\?.*)?$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}/index.php\?page=cedi&amp;id={R:2}&amp;{R:3}" appendQueryString="true" />
            </rule>

            <!--# These have a specially reduce form (wide is implied)-->
            <rule name="Imported Rule 27" stopProcessing="true">
               <match url="^(site|forum|adminzone|cms|collaboration)/galleries/image/([^\&amp;\?]*)\.htm(\?.*)?$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}/index.php\?page=galleries&amp;type=image&amp;id={R:2}&amp;wide=1&amp;{R:3}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 28" stopProcessing="true">
               <match url="^(site|forum|adminzone|cms|collaboration)/galleries/video/([^\&amp;\?]*)\.htm(\?.*)?$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}/index.php\?page=galleries&amp;type=video&amp;id={R:2}&amp;wide=1&amp;{R:3}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 29" stopProcessing="true">
               <match url="^(site|forum|adminzone|cms|collaboration)/iotds/view/([^\&amp;\?]*)\.htm(\?.*)?$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}/index.php\?page=iotds&amp;type=view&amp;id={R:2}&amp;wide=1{R:3}" appendQueryString="true" />
            </rule>

            <!--# These are standard patterns-->
            <rule name="Imported Rule 30" stopProcessing="true">
               <match url="^(site|forum|adminzone|cms|collaboration)/([^/\&amp;\?]+)/([^/\&amp;\?]*)/([^\&amp;\?]*)\.htm(\?.*)?$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}/index.php\?page={R:2}&amp;type={R:3}&amp;id={R:4}&amp;{R:5}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 31" stopProcessing="true">
               <match url="^(site|forum|adminzone|cms|collaboration)/([^/\&amp;\?]+)/([^/\&amp;\?]*)\.htm(\?.*)?$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}/index.php\?page={R:2}&amp;type={R:3}&amp;{R:4}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 32" stopProcessing="true">
               <match url="^(site|forum|adminzone|cms|collaboration)/([^/\&amp;\?]+)\.htm(\?.*)?$" ignoreCase="false" />
               <action type="Rewrite" url="{R:1}/index.php\?page={R:2}&amp;{R:3}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 33" stopProcessing="true">
               <match url="^([^/\&amp;\?]+)/([^/\&amp;\?]*)/([^\&amp;\?]*)\.htm(\?.*)?$" ignoreCase="false" />
               <action type="Rewrite" url="index.php\?page={R:1}&amp;type={R:2}&amp;id={R:3}&amp;{R:4}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 34" stopProcessing="true">
               <match url="^([^/\&amp;\?]+)/([^/\&amp;\?]*)\.htm(\?.*)?$" ignoreCase="false" />
               <action type="Rewrite" url="index.php\?page={R:1}&amp;type={R:2}&amp;{R:3}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 35" stopProcessing="true">
               <match url="^([^/\&amp;\?]+)\.htm(\?.*)?$" ignoreCase="false" />
               <action type="Rewrite" url="index.php\?page={R:1}&amp;{R:2}" appendQueryString="true" />
            </rule>
         </rules>
      </rewrite>

      <defaultDocument>
         <files>
            <clear />
            <add value="index.html" />
            <add value="index.php" />
         </files>
      </defaultDocument>

      <security>
         <requestFiltering>
            <requestLimits maxAllowedContentLength="2097152000" />
            <!--2GB; also see maxRequestLength-->
         </requestFiltering>
      </security>

      <!-- HTTP Errors section should only be enabled if the "Error Pages"
      feature has been delegated as "Read/Write" at the Web Server level.
         <httpErrors>
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="404" prefixLanguageFilePath="" path="/index.php?page=404" responseMode="ExecuteURL" />
         </httpErrors>
      -->
   </system.webServer>

   <system.web>
      <httpRuntime maxRequestLength="2048000" />
   </system.web>
</configuration>

I worked on a dotnet IIS project recently handling uploads, so I learnt about IIS's internal limits. I set maxAllowedContentLength and maxRequestLength here.


Last edit: by Chris Graham


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#111495
TQ
Avatar

Honoured member

Using the entire web.config threw a '500 - Internal server error.' but I will now look at maxAllowedContentLength and maxRequestLength and see what I can make of it.

Thanks Chris

TQ


Back to the top
 
Posted
Rating:
#111500
TQ
Avatar

Honoured member

Right on the money as usual Chris!

For anyone that might want to set this via IIS Manager GUI:

Highlight the website> Requests Filtering> Edit Feature Settings> Request Limits> Maximum Allowed Content Length (Bytes)> enter new value.

Thanks Chris, you have averted yet another crisis :lol:

TQ
Back to the top
 
Posted
Rating:
#111501
Avatar

Hi,

Do you think you can get it working via the web.config? Something is wrong with it, as I made the change in the latest update and it killed it for another user who upgraded.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#111502
Avatar

Ah, I had made a silly XML error. I edited my post, hopefully this works now.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#111503
TQ
Avatar

Honoured member

If you were asking if it was possible to change maxAllowedContentLength via the GUI, that's exactly what I did.

Probably irrelevant now as you have fixed the XML.

TQ

Back to the top
 
Posted
Rating:
#111504
Avatar

No, I meant, can you test unsetting it from the GUI, then see if my updated web.config works? It would be nice to know if this is settled for everyone out of the box.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#111505
TQ
Avatar

Honoured member

Chris Graham said

No, I meant, can you test unsetting it from the GUI, then see if my updated web.config works? It would be nice to know if this is settled for everyone out of the box.


The short answer is, sort of!

Yes, the uploads work because the method I described only adds/amends the maxAllowedContentLength in web.config file. In my case, I had removed the file so it just created a new web.config with that one entry in it.

The issue I had was that the home page was blank. This was easily addresses by adding /index.php to the address.

Now you should know that I am still using IIRF rewrite because I have so many little titbits in it to keep the would be hackers from filling my mailbox but the other thing IIRF does is redirect all HTTP addresses to HTTPS.

So I turned IIRF off with your web.config and I still get the blank page (in more than 1 browser on more than 1 machine) if I call HTTP but if I called the HTTPS address directly it appeared to be fine.

I wasn't able to test it in depth tonight as the site is busy but I will have another look in the morning.

TQ
Back to the top
 
Posted
Rating:
#111509
TQ
Avatar

Honoured member

Hi Chris,

Apologies for taking so long to get back to you, my day did not go to plan.

I tested the web.config again with IIRF turned off and even added a rewrite rule as the first rule to redirect to HTTPS like:

Code

<rule name="Redirect to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
</rule>
but the blank page still presented.

Would you like me to set up a dummy site to play with?

TQ
Back to the top
 
Posted
Rating:
#111510
TQ
Avatar

Honoured member

You better disregard what I said about the blank page for now, it looks as if I'm in error.

I've created a test site and it works just fine.

I will investigate further.

TQ
Back to the top
 
Posted
Rating:
#111512
Avatar

Ok cool, thanks :).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: