1

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:

<system.applicationHost>
    <sites>
        <siteDefaults>
            <limits connectionTimeout="00:00:05" />
        </siteDefaults>
    </sites>
</system.applicationHost>

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:

<configuration>
 <configSections>
  <sectionGroup name="system.applicationHost"
    type="System.ApplicationHost.Configuration.SystemApplicationHostSectionGroup">
      <section name="sites"
              type="System.ApplicationHost.Configuration.SitesSection"
              allowDefinition="MachineOnly"
              overrideModeDefault="Deny" />
  </sectionGroup>

I get the following error:

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

0

I have used this in Web Config:

<appSettings>
    <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" />
  </appSettings>
| 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.