Online Book Reader

Home Category

Programming Microsoft ASP.NET 4 - Dino Esposito [46]

By Root 5263 0
the section can be declared at any level, including subdirectory levels. This fact accounts for the great flexibility that allows you to set up the run-time environment with the finest granularity. Configurable attributes are listed in Table 3-10.

Table 3-10. ASP.NET Runtime Attributes

Attribute

Description

apartmentThreading

Enables apartment threading for classic ASP compatibility. The default is false.

appRequestQueueLimit

Specifies the maximum number of requests the application is allowed to queue before returning error 503—Server too busy. The default is 5000.

delayNotificationTimeout

Specifies the timeout for delaying notifications. The default is 5 seconds.

Enable

Specifies whether the AppDomain is enabled to accept incoming requests. This is true by default.

enableHeaderChecking

Specifies whether ASP.NET should check the request header for potential injection attacks. If an attack is detected, ASP.NET responds with an error. This is true by default.

enableKernelOutputCache

Enables the http.sys kernel-level cache on IIS 6 and higher. The default is true.

enableVersionHeader

Outputs a header with the ASP.NET version with each request. The default is true. You can disable it for production sites.

encoderType

Indicates the class to be used for any encoding and decoding tasks in ASP.NET, such as those performed by HttpServerUtility.

executionTimeout

Specifies the maximum number of seconds a request is allowed to execute before ASP.NET automatically times it out. The default is 110 seconds.

maxQueryStringLength

Indicates the maximum accepted size of the query string. The default is 260.

maxRequestLength

Indicates the maximum accepted size (in KB) of a Web request. No request is accepted if its overall length exceeds the threshold of 4 MB.

maxUrlLength

Indicates the maximum accepted size of the URL. The default is 260.

minLocalRequestFreeThreads

Indicates the minimum number of free threads needed to allow the execution of new local requests. The default threshold value is set to 4.

minFreeThreads

Indicates the minimum number of free threads needed to allow the execution of new Web requests. The default threshold value is set to 8.

requestLengthDiskThreshold

Specifies the input stream buffering threshold limit in number of bytes. Its value should not exceed the maxRequestLength. The default is 256 bytes.

requireRootedSaveAsPath

Specifies whether the file name parameter in a Request’s SaveAs method must be an absolute path.

requestValidationMode

Indicates whether HTTP request validation can be customized (only in ASP.NET 4) or whether it should happen through a system-provided layer (as in earlier versions). The default value is “4.0”. Anything else is considered as “do as ASP.NET 2.0 does.”

requestValidationType

Indicates the name of a type that is used to validate HTTP requests.

sendCacheControlHeader

Specifies whether to send a cache control header.

shutDownTimeout

Number of seconds that are allowed for the worker process to shut down. When the timeout expires, ASP.NET shuts down the worker process. The default is 90 seconds.

useFullyQualifiedRedirectUrl

Indicates whether client redirects must be automatically converted to fully qualified URLs ( true) or used as specified in the page source code (false). The default is false.

waitChangeNotification, maxWaitChangeNotification

Indicates the minimum and maximum number of seconds to wait (0 by default) before restarting the AppDomain after a file change notification. This is actually pretty important for XCopy deployment, especially with named assemblies in precompiled sites.

Notice that ASP.NET won’t process a request if not enough free threads are available in the thread pool. When this happens, the request is queued to the application until the threshold set by the appRequestQueueLimit is exceeded. But why, in the default case, does ASP.NET need at least eight free threads to execute a request? These free threads are at the disposal of ongoing requests (for example, the request

Return Main Page Previous Page Next Page

®Online Book Reader