ASP Registry Entries

Applies To: Windows Server 2003, Windows Server 2003 with SP1

The following registry entries affect the behavior and performance of ASP on IIS. On a default installation of IIS, you will not see these registry entries, which means the default values are being used. To set these entries to their non-default values, you must manually create the keys and set them.

DisableLazyContentPropagation

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 0 (lazy propagation enabled)

Range: 0 - 1

Lazy propagation refers to the action that IIS takes when a large amount of content is updated at one time.

IIS has an internal limit of how much content can be updated in the in-memory template cache. If the size of the updated content exceeds that limit, IIS marks each of the files in the in-memory template cache as invalid. On the first request to an invalid file, IIS begins to compile a new template but the expired template is served and is continued to be served until the new template is compiled.

If you set DisableLazyContentPropagation to 1, IIS behaves as it does for IIS 5.0 and IIS 5.1 when a large amount of content is updated at one time. IIS flushes the in-memory template cache, and performance can slow to a standstill as each new request to the server forces IIS to compile new templates. If you are developing Web pages and making changes to a few files at a time, you do not have to refresh your pages twice to see new changes because lazy propagation only applies when a large amount of content is updated at one time.

ThreadMax

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 100

Range: 0 - PoolThreadLimit

This value is a hard limit on the maximum number of ASP worker threads. The number of threads in ASP is generally determined by the number of processors in the system multiplied by the AspProcessorThreadMax metabase setting. If the product of the number of processors present and AspProcessorThreadMax exceeds the value of ThreadMax, the ASP engine will not spawn any additional threads than the value specified by ThreadMax.

noteNote
A large number of threads can reduce system performance because of the resulting high context switching rate.
DisableComPlusCpuMetric

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 0 (enabled)

Range: 0 (enabled) - 1 (disabled)

This setting determines whether COM+ controls the rate at which new threads are spawned. If DisableComPlusCpuMetric is set to 1 (disabled), COM+ will not control the rate of spawning of additional threads. If DisableComPlusCpuMetric is set to 0(the default), COM+ controls spawning of additional threads based on a number of factors; primarily on the CPU utilization and the Context Switch rate for the system. These values can also be adjusted using the registry. To specify the CPU utilization at which COM+ begins to throttle the thread creation, use the MaxCPU Registry key. To specify the context switch rate at which COM+ should throttle thread creation use the MaxCSR registry key.

ImportantImportant
Changing these settings from the default value can have a severe impact on performance. It is recommended that you leave these values at their defaults.
AspMaxResponseHeaderLength

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 64 Kilobytes

Range: 0 - ffffffff

This is a security setting that limits the size of the header generated using the response object by an ASP script file. If the size of the response header exceeds the value of AspMaxResponseHeaderLength, the system returns a 500 response to the client.

AspMaxPropertyStringLength

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 16 Kilobytes

Range: 0 - ffffffff

This is a security setting that limits the string length of a single property name. If the string length of the property name exceeds the value of AspMaxPropertyStringLength, the system returns a 500 response to the client.

DisableCachedResponseOnUNCAccessFailure

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 0 (enabled)

Range: 0 (enabled) - 1 (disabled)

This setting determines whether ASP will serve a cached response in the event a network or other communication problem prevents ASP from validating the requested page against the back end system (mapped by way of a UNC path) containing the content to be served. By default, if communication with the back end system is not possible when ASP attempts to validate the requested page, ASP will serve the cached page. Note that the response is still checked against existing credentials stored with the file. An event log message will be logged to let the administrator know that the system took a corrective action. The administrator may want to look at the event log if customers complain of stale content. There might be a problem with the network connection with the back end. If DisableCachedResponseOnUNCAccessFailure is set to 1 (disabled), ASP returns a 500 error to the client. This setting can be useful for failure detection systems to kick in (e.g., if a load balancer attached to the system it can direct the request to another system.) This prevents serving stale content, and also notifies the administrator of the error.

F5AttackDetectionEnabled

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 1 (enabled)

Range: 0 (disabled) - 1 (enabled)

This is a security setting that determines whether ASP scans the request queue at regular intervals to detect disconnected requests and remove them from the queue. This has the effect of not allowing disconnected requests to fill up the request queue. In addition, cleaning up the queue improves system efficiency.

noteNote
Because disabling this setting can make your system vulnerable to attack, it is strongly recommended that you leave this setting enabled.
HangDetRequestThreshold

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 1000

Range: 0 - ffffffff

This setting determines whether the hang detection algorithm should be invoked based on the number of requests in the request queue. A value of 0 means that the hang detection algorithm is never invoked.

HangDetThreadHungThreshold

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 50 (%)

Range: 1 - 100

This setting determines what percentage of the total number of ASP application threads must be unresponsive to fulfill one of the criteria for recycling the application.

HangDetConsecIllStatesThreshold

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 3

Range: 0 - 3

This setting helps prevent applications from being declared unhealthy and recycled because of transitory bursts in the application's request queue. If the number of times an application is consecutively detected to be in the "ill" state exceeds the HangDetConsecIllStatesThreshold value, AND if the application's request queue length has been increasing during the same period of time, ASP reports the application as being unhealthy, and IIS recycles the application.

HangDetEnabled

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 1 (enabled)

Range: 0 (disabled) - 1 (enabled)

This setting determines whether or not ASP checks for and tracks unresponsive threads.

Once ASP hands over a page to a COM component for execution, it does not regain control unless the component returns a success or error. If a thread does not return within the timeout period specified on the AspScriptTimeout metabase property), it is considered unresponsive. Because there are a limited number of threads that can be executing at any one time on the system, each unresponsive thread means there is 1 less thread available to service a request queue. This results in a build up of the request queue unless the unresponsive threads are closed down.

ASP invokes the hang detection algorithm based on a combination of ASP registry and metabase request queue length settings. If the hang detection algorithm determines that the ratio of queued requests to the number of available threads high, ASP reports the application(s) with the unresponsive thread(s) as unhealthy, and IIS recycles the application(s).

EnableChangeNotificationForUNC

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 0 (disabled)

Range: 0 (disabled) - 1 (enabled)

This setting determines whether ASP relies on the Change Notification mechanism for UNC to determine whether or not content is stale. The file change notification mechanism is not considered robust for tracking changes over UNC, and for this reason this setting is disabled. IIS and ASP use the Last Modified mechanism to track files instead.

FileMonitoringEnabled

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 1 (enabled)

Range: 0 (disabled) - 1 (enabled)

This setting determines whether files are registered for change notification. This setting is no longer used as the functionality has been encompassed in system logic and the FileMonitoringEnabled setting. Do not use this setting.

FileMonitoringTimeoutSeconds

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 5

Range: 0 - ffffffff

The last modified time stamp method of maintaining consistency in cache verifies if last modified time stamp of a file has changed since the file was last checked. This means that the check occurs on every request. This has a serious affect on performance. FileMonitoringTimeoutSeconds specfies the number of seconds that the system should return the cached copy since its last timestamp check.

Increasing the value of this key will improve performance, but can lead to returning stale content for the number of seconds specified in this key. This key applies to cases where the content is stored on a back end UNC or the local disk has had a huge content propagation and the change notification buffer has not been able to capture all the changes, thus pushing the system into a last modified algorithm for all files. You may want to tailor this key to suit your needs.

MaxCSR

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: None. Determined dynamically.

Range: 0 - ffffffff

If COM+ is managing the CPU metric then this setting can be adjusted to tune COM+'s creation of the number of threads that ASP will use to process requests. COM+ tries to create threads on demand while staggering their creation so as not to put the system into an overloaded state. MaxCSR watches the context switch rate, and if the context switching in the system exceeds the rate specified in this key, COM+ stops spawning threads until the context switch rate falls below the value specified by this key.

MaxCPU

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 100

Range: 0 - 100

If COM+ is managing the CPU metric then this setting can be adjusted to tune COM+'s creation the number of threads that ASP uses to process requests, while staggering their creation so as not to put the system into an overloaded state. MaxCPU watches CPU utilization, and if the CPU utilization in the system exceeds the rate specified in this key, COM+ will stop spawning threads until CPU usage falls below the value specified by this key.

DisableOOMRecycle

Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters\

Data Type: REG_DWORD

Default Value: 0 (enabled)

Range: 0 (enabled) - 1 (disabled)

If ASP is not able to allocate memory for its internal processing, it assumes the system is out of memory and requests that the application be recycled, thereby freeing memory possibly held by a misbehaving application.

Allowing ASP to request recycling based on out of memory conditions must be considered carefully because of unintended consequences, such as loss of session state.