Edit ASP Settings (IIS 7)
Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista
IIS 7 provides default settings for ASP applications, but you can change those settings as needed. For example, you may want to enable client-side debugging on a test server to aide in troubleshooting issues during a test pass.
Prerequisites
For information about the levels at which you can perform this procedure, and the modules, handlers, and permissions that are required to perform this procedure, see ASP Settings Feature Requirements (IIS 7).
Exceptions to feature requirements
- None
To configure ASP settings
You can perform this procedure by using the user interface (UI), by running Appcmd.exe commands in a command-line window, by editing configuration files directly, or by writing WMI scripts.
User Interface
To Use the UI
Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see Open IIS Manager (IIS 7). For information about navigating to locations in the UI, see Navigation in IIS Manager (IIS 7).
In Features View, double-click ASP.
On the ASP page, edit settings as necessary.
When finished, click Apply in the Actions pane.
Command-line
Specify default character set
To specify the default character set for an application, use the following syntax:
**appcmd set config /section:asp /codePage:**integerRange
The variable integerRange is the default character set. For example, to set the code page to a Latin character set used in American English and many European alphabets, type the following at the command prompt, and then press Enter:
**appcmd set config /section:asp /codePage:**1252
Enable or disable buffering
To enable or disable buffering of ASP application output, use the following syntax:
appcmd set config /section:asp /bufferingOn:True|False
True enables buffering whereas False disables buffering. The default value is True.
Enable or disable HTTP 1.1 chunked transfer encoding
To enable HTTP 1.1 chunked transfer encoding for the World Wide Web publishing service, use the following syntax:
appcmd set config /section:asp /enableChunkedEncoding:True|False
True enables HTTP 1.1 chunked transfer encoding whereas False disables HTTP 1.1 chunked transfer encoding. The default value is True.
Enable or disable HTML fallback
To enable or disable HTML fallback, use the following syntax:
appcmd set config /section:asp /enableASPHTMLFallback:True|False
True causes an .htm file that has the same name as the requested .asp file, if it exists, to be sent instead of the .asp file if the request is rejected because of a full request queue. The default value is True.
Enable or disable parent paths
To enable or disable paths relative to the current directory or above the current directory, use the following syntax:
appcmd set config /section:asp /enableParentPaths:True|False
True sets ASP pages to allow paths relative to the current directory or above the current directory. The default value is True.
Set client connection test interval
To set a time interval after which ASP will check to see whether the client is still connected before executing a request, use the following syntax:
**appcmd set config /section:asp /queueConnectionTestTime:**timeSpan
The variable timeSpan sets the time interval (hh:mm:ss) after which ASP will check to see whether the client is still connected before executing a request. The default value is 00:00:03.
Set maximum requesting entity body limit
To specify the maximum number of bytes allowed in the entity body of an ASP request, use the following syntax:
**appcmd set config /section:asp /maxRequestEntityAllowed:**int
The variable int represents the maximum number of bytes allowed in the body of an ASP request. The default value is 200000 bytes.
Set request queue length
To specify the maximum number of concurrent ASP requests allowed into the queue, use the following syntax:
**appcmd set config /section:asp /requestQueueMax:**int
The variable int represents the maximum number of concurrent ASP requests that are allowed into the request queue. The default value is 3000.
Set request queue time-out
To specify the period of time that an ASP request can wait in the request queue, use the following syntax:
**appcmd set config /section:asp /queueTimeout:**timeSpan
The variable timeSpan represents the maximum time (hh:mm:ss) that an ASP request can wait in the request queue. The default value is 00:00:00.
Specify response buffering limit
To control the maximum number of bytes that an ASP page can write to the response buffer before a flush occurs, use the following syntax:
**appcmd set config /section:asp /bufferingLimit:**int
The variable int represents the maximum size, in bytes, of the ASP buffer. The default value is 4194304 bytes.
Set script time-out
To specify the default length of time that ASP pages let a script run before terminating the script and writing an event to the Windows Event Log, use the following syntax:
**appcmd set config /section:asp /scriptTimeout:**timeSpan
The variable timeSpan represents the maximum time (hh:mm:ss) that an ASP request can run before an event is written to the Windows Event Log. The default value is 00:01:30.
Specify threads per processor limit
To specify the maximum number of worker threads per processor that ASP can create, use the following syntax:
**appcmd set config /section:asp /processorThreadMax:**int
The variable int represents the maximum number of worker threads per processor that ASP can create. The default value is 25.
Specify default locale identifier
To define how dates, times, and currencies are formatted for an ASP application, use the following syntax:
**appcmd set config /section:asp /lcid:**int
The variable int represents the default locale identifier for an ASP application. The default value is 0.
Enable or disable automatic application restart
To enable or disable automatic restart of ASP applications whenever a configuration setting is changed, use the following syntax:
appcmd set config /section:asp /enableApplicationRestart:True|False
True enables ASP applications to be automatically restarted whenever a configuration setting is changed. The default value is True.
Enable or disable line number calculation
To enable or disable ASP to calculate and store the line number of each executed line of code in order to provide the number in an error report, use the following syntax:
appcmd set config /section:asp /calLineNumber:True|False
True enables line number calculation and storage. The default value is True.
Enable or disable COM component exception trapping
To enable or disable ASP pages to catch exceptions thrown by COM components, use the following syntax:
appcmd set config /section:asp /exceptionCatchEnable:True|False
True enables COM component exception trapping. If set to False, the Microsoft Script Debugger tool does not catch exceptions sent by the component that you are debugging. The default value is True.
Enable or disable client-side debugging
To enable or disable client-side debugging, use the following syntax:
appcmd set config /section:asp /appAllowClientDebug:True|False
True enables client-side debugging. The default value is False.
Enable or disable log error requests
To enable or disable the writing of ASP errors to the application section of the Windows event log, use the following syntax:
appcmd set config /section:asp /logErrorRequests:True|False
True enables log error requests. By default, ASP errors are written to the client browser and the IIS logs. The default value is True.
Enable or disable server-side debugging
To enable or disable ASP debugging on the server, use the following syntax:
appcmd set config /section:asp /appAllowDebugging:True|False
True enables server-side debugging for ASP applications. The default value is False.
Enable or disable Windows event logging of ASP errors
To enable or disable logging of ASP errors to the Windows event log, use the following syntax:
appcmd set config section:asp /errorsToNTLog:True|False
True enables logging of ASP errors to the Windows event log. By default, ASP errors are written to the client browser and the IIS logs. The default value is False.
Run On End Functions Anonymously
To enable or disable SessionOnEnd and ApplicationOnEnd global ASP functions to run as the anonymous user, use the following syntax:
appcmd set config /section:asp /runOnEndAnonymously:True|False
True enables SessionOnEnd and ApplicationOnEnd global ASP functions to run as the anonymous user. The default value is True.
Specify script error message
To specify the error message to send to the browser if specific debugging errors are not sent to the client, use the following syntax:
**appcmd set config /section:asp /scriptErrorMessage:**string
The variable string represents the error message that will be sent to the browser when specific debugging errors are not sent to the client. The default value is "An error occurred on the server when processing the URL. Please contact the system administrator".
Enable or disable sending errors to the browser
To enable or disable the writing of debugging specifics (file name, error, line number, and description) to the client browser in addition to logging them to the Windows event log, use the following syntax:
appcmd set config /section:asp /scriptErrorSentToBrowser:True|False
True enables the writing of debugging specifics to the client browser. The default value is False.
Specify default script language
To specify the default script language for all ASP applications that are running on the Web server, use the following syntax:
**appcmd set config /section:asp /scriptLanguage:**string
The variable string represents the default script language. The default value is VBScript.
Specify cache directory path
To specify the name of the directory where ASP stores compiled ASP templates when the in-memory cache overflows, use the following syntax:
**appcmd set config /section:asp /diskTemplateCacheDirectory:**string
The variable string represents the cache directory path. The default value is %windir%\system32\inetsrv\ASP Compiled Templates.
Enable or disable type library caching
To enable or disable the caching of type libraries, use the following syntax:
appcmd set config /section:asp /enableTypelibCache:True|False
True enables the caching of type libraries. The default value is True.
Set maximum number of compiled ASP templates to store
To set the maximum number of compiled ASP templates that can be stored, use the following syntax:
**appcmd set config /section:asp /maxDiskTemplateCacheFiles:**int
The variable int represents the maximum number of compiled ASP templates to store. The default value is 2000.
Set maximum number of compiled ASP templates to store
To set the maximum number of precompiled script files to cache, use the following syntax:
**appcmd set config /section:asp /scriptFileCacheSize:**int
The variable int represents the number of precompiled script files to cache. If set to 0, no script files are cached. If set to 4294967295, all requested script files are cached. The default value is 500.
Set maximum number of scripting engines to cache
To set the maximum number of scripting engines that ASP pages will keep cached in memory, use the following syntax:
**appcmd set config /section:asp /scriptEngineCacheMax:**int
The variable int represents the maximum number of scripting engines that will be cached. The default value is 250.
Enable or disable COM+ side-by-side assemblies
To enable or disable side-by-side COM+ assemblies, which allow ASP applications to specify which version of a system DLL or classic COM component to use, use the following syntax:
appcmd set config /section:asp /appServiceFlags:True|False
True enables COM+ side-by-side assemblies. The default value is False.
Enable or disable COM+ tracker
To enable or disable COM+ tracker, use the following syntax:
appcmd set config /section:asp /enableTypelibCache:True|False
True enables COM+ tracker, which lets administrators or developers debug ASP applications. The default value is False.
Enable or disable multithreaded environments
To enable or disable ASP to run in a multithreaded environment, use the following syntax:
appcmd set config /section:asp /executeInMta:True|False
True enables ASP to run in a multithreaded environment. The default value is False.
Enable or disable thread model checking
To enable or disable whether IIS checks the threading model of any component that your application creates, use the following syntax:
appcmd set config /section:asp /trackThreadingModel:True|False
True enables thread model checking. The default value is False.
Specify COM+ partition ID
To specify the Globally Unique Identifier (GUID) of the COM+ partition, use the following syntax:
**appcmd set config /section:asp /partitionID:**string
The variable string represents the GUID of the COM+ partition. The default value is 00000000-0000-0000-0000-000000000000.
Note
You must also set the appServiceFlags flag to True.
Specify COM+ application
To specify the name of the COM+ application, use the following syntax:
**appcmd set config /section:asp /sxsName:**string
The variable string represents name of the COM+ application.
Note
You must also set the appSeviceFlags flag to True.
Enable or disable COM+ partitioning
To enable or disable COM+ partitioning, use the following syntax:
appcmd set config /section:asp /appServiceFlags:True|False
True enables COM+ partitioning, which can be used to isolate applications in their own COM+ partition. The default value is False.
Note
If set to True, you must also set a value for the partitionID property.
Enable or disable session state
To enable or disable session state persistence for an ASP application, use the following syntax:
appcmd set config /section:asp /allowSessionState:True|False
True enables session state persistence. The default value is True.
Set maximum number of concurrent sessions
To set the maximum number of concurrent sessions that ASP will allow, use the following syntax:
**appcmd set config /section:asp /max:**int
The variable int represents the maximum number of concurrent sessions. The default value is -1.
Enable or disable secure session ID
To enable or disable the sending of a session ID as a secure cookie if assigned over a secure session channel, use the following syntax:
appcmd set config /section:asp /keepSessionIdSecure:True|False
True enables secure session ID. The default value is True.
Set session time-out
To specify the default period of time that a session object is maintained after the last request associated with the object is made, use the following syntax:
**appcmd set config /section:asp /timeout:**timeSpan
The variable timeSpan represents the maximum time (hh:mm:ss) that a session object is maintained after the last request associated with the object is made. The default value is 00:20:00.
For more information about Appcmd.exe, see Appcmd.exe (IIS 7).
Configuration
The procedure in this topic affects the following configuration elements:
- <asp>
For more information about IIS 7 configuration, see IIS 7.0: IIS Settings Schema on MSDN.
WMI
Use the following WMI classes, methods, or properties to perform this procedure:
- AspSection class
For more information about WMI and IIS, see Windows Management Instrumentation (WMI) in IIS 7. For more information about the classes, methods, or properties associated with this procedure, see the IIS WMI Provider Reference on the MSDN site.