httpRuntime

.NET Framework General Reference 

<httpRuntime> Element

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

<configuration>
   <system.web>
      <httpRuntime>

<httpRuntime useFullyQualifiedRedirectUrl="true|false"
             maxRequestLength="size in kbytes"
             executionTimeout="seconds"
             minFreeThreads="number of threads"
             minFreeLocalRequestFreeThreads="number of threads"
             appRequestQueueLimit="number of requests"
             versionHeader="version string"/>
Optional Attributes
AttributeOptionDescription
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.
enableSpecifies whether the App Domain is enabled. at the current node and at the child node level. The default value is true.
   trueSpecifies that the App Domain be enabled.
   falseSpecifies 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.
 trueSpecifies that caching be enabled.
 falseSpecifies 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 "http://server/path" } form, which is necessary for some mobile controls) or whether relative redirects are instead sent to the client.
   trueSpecifies 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.
   falseSpecifies 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="").
Example

The following example specifies HTTP runtime parameters for an asp.net application.

<configuration>
   <system.web>
      <httpRuntime maxRequestLength="4000"
         useFullyQualifiedRedirectUrl="true"
         executionTimeout="45"
         versionHeader="1.1.4128"/>
   </system.web>
</configuration>
Requirements

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值