Is there any way to enable keep-alive on IIS 7 in a hosted scenario?

I attempted to use the answer to this SO question Where (or how) is the keep-alive setting in web.config?.

I added the following after the </configSections> closing tag:

            <limits connectionTimeout="00:00:05" />

This is the error I get:

Unrecognized configuration section system.applicationHost.

If I follow this MSDN article: Walkthrough: Creating a Configuration File for Hosted Web Core and add:

  <sectionGroup name="system.applicationHost"
      <section name="sites"
              overrideModeDefault="Deny" />

I get the following error:

It is an error to use a section registered as allowDefinition='MachineOnly' beyond machine.config.


I have used this in Web Config:

    <add key="CommandTimeOut" value="1000" />
      <!-- Number of seconds with no activity before the server times out and closes. 
         Set to -1 to never shut down the server. -->
      <add key="keepalive" value="-1" />
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.