Share via

<httpRuntime> Element

Configures ASP.NET HTTP runtime settings. This section can be declared at the machine, site, application, and subdirectory levels.


<httpRuntime useFullyQualifiedRedirectUrl="true|false"
             maxRequestLength="size in kbytes"
             minFreeThreads="number of threads"
             minFreeLocalRequestFreeThreads="number of threads"
             appRequestQueueLimit="number of requests"
             versionHeader="version string"/>

Optional Attributes

Attribute Option Description
appRequestQueueLimit     The maximum number of requests that ASP.NET will queue for the application. When there are not enough free threads to process a request, the requests are queued. Incoming requests will be rejected with a "503 - Server Too Busy" error when the queue exceeds the limit specified in this setting.
executionTimeout     Indicates the maximum number of seconds that a request is allowed to execute before being automatically shut down by ASP.NET.
enable Specifies whether the App Domain is enabled. at the current node and at the child node level. The default value is true.
    true Specifies that the App Domain be enabled.
    false Specifies that the App Domain be disabled. The application is not loaded in memory and any client request will cause a 404 error to be issued.
idleTimeOut     Specifies the App Domain idle time before it is shut down. The default value is 20 minutes.
enableKernelModeCache   Specifies whether output caching is enabled. At this time, this attribute is only relevant when IIS version 6.0 or later is installed. The output caching configuration and type of request determines whether content can be cached.

In order to cache a response, the following criteria need to be met:

  • Caching must be explicitly enabled by a page directive or by the use of the caching API.
  • Caching must have an expiration policy so that the kernel knows when to discard it.
  • Caching cannot have any variable headers or parameters.
  • The request must not require any authentication.
  true Specifies that caching be enabled.
  false Specifies that caching be disabled.
maxRequestLength     Indicates the maximum file upload size supported by ASP.NET. This limit can be used to prevent denial of service attacks caused by users posting large files to the server. The size specified is in kilobytes. The default is 4096 KB (4 MB).
minFreeLocalRequestFreeThreads     The minimum number of free threads that ASP.NET keeps available to allow execution of new local requests. This number of threads is kept reserved for requests coming from the local host, in case some requests issue child requests to the local host during their processing. This avoids a possible deadlock with recursive reentry into the Web server.
minFreeThreads     The minimum number of free threads to allow execution of new requests. ASP.NET keeps this many threads free for requests that require additional threads to complete their processing.
useFullyQualifiedRedirectUrl     Indicates whether client-side redirects are fully qualified (in {HYPERLINK "https://server/path" } form, which is necessary for some mobile controls) or whether relative redirects are instead sent to the client.
    true Specifies that client-side redirects need to be sent fully qualified. This is achieved by automatically converting all redirects that are not fully qualified to fully qualified form.
    false Specifies that client-side redirects do not need to be automatically converted to the fully qualified form. false is the default.
versionHeader     Specifies the value of a version header that ASP.NET sends with every response. This attribute is used by Microsoft Visual Studio .NET to determine which version of ASP.NET is in use. It is not necessary for production sites and can be disabled either by removing the attribute from Web.config or Machine.config, or setting the attribute to an empty string (versionHeader="").


The following example specifies HTTP runtime parameters for an ASP.NET application.

      <httpRuntime maxRequestLength="4000"


Contained Within: <system.web>

Web Platform: IIS 5.0, IIS 5.1, IIS 6.0

Configuration File: Machine.config, Web.config

Configuration Section Handler: System.Web.Configuration.HttpRuntimeConfigurationHandler

See Also

ASP.NET Configuration | ASP.NET Settings Schema | Caching ASP.NET Pages