Create an Application Pool (IIS 7)
Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista
Application pools isolate sites and applications to address reliability, availability, and security issues. You should consider creating applications pools for any one of the following reasons:
To group sites and applications that run with the same configuration settings.
To isolate sites and applications that run with unique configuration settings.
To increase security by using a custom identity to run an application.
To prevent resources in one application from accessing resources in another application. For example, ISPs might create individual application pools for each customer's sites and applications. Separating customer content in this manner can prevent one customer's resources from accessing resources on another customer's site, even though both customers' sites are on the same Web server.
To improve performance by separating unstable applications from well-behaved applications.
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 Application Pools Feature Requirements (IIS 7).
Exceptions to Feature Requirements
To create an application pool on a Web server
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.
To use the UI
Open IIS Manager. For information about opening IIS Manager, see Open IIS Manager (IIS 7).
In the Connections pane, expand the server node and click Application Pools.
On the Application Pools page, in the Actions pane, click Add Application Pool.
On the Add Application Pool dialog box, type a friendly name for the application pool in the Name box.
From the .NET Framework version list, select the version of the .NET Framework required by your managed applications, modules, and handlers. Or select No Managed Code if the applications that you run in this application pool do not require the .NET Framework.
From the Managed pipeline mode list, select one of the following options:
Integrated, if you want to use the integrated IIS and ASP.NET request- processing pipeline.
Classic, if you want to use IIS and ASP.NET request-processing modes separately. In classic mode, managed code is processed by using Aspnet_isapi.dll instead of the IIS 7 integrated pipeline.
Select Start application pool immediately to start the application pool whenever the WWW service is started. By default, this is selected.
To add an application pool to a Web server by using default settings, use the following syntax:
**appcmd add apppool /name:**string
The variable string is the name that you want for the application pool. For example, to add an application pool named Marketing, type the following at the command prompt, and then press ENTER:
appcmd add apppool /name:Marketing
By default, IIS adds an application pool that runs in integrated mode and uses .NET Framework version 2.0. If you want to add an application pool that runs a different version of the .NET Framework or that uses classic mode, you can specify the .NET Framework version with the /managedRuntimeVersion attribute and the managed request-processing mode with the /managedPipelineMode attribute.
To add an application pool to a Web server by using settings different from the default settings, use the following syntax:
**appcmd add apppool /name:**string /managedRuntimeVersion:.string /managedPipelineMode: Integrated | Classic
The variable namestring is the name that you want for the application pool. The variable managedRuntimeVersionstring is the version of the .NET Framework that you want the application pool to run. When you want to run a specific version of the .NET Framework, specify the value for managedRuntimeVersionstring as v1.0, v1.1, or v2.0, or leave the value blank if you do not want to run managed code in the application pool. For example, to add an application pool that does not run managed code and that uses classic mode, type the following at the command prompt, and then press ENTER:
appcmd add apppool /name:Marketing /managedRuntimeVersion: /managedPipelineMode:Classic
For more information about Appcmd.exe, see Appcmd.exe (IIS 7).
The procedure in this topic affects the following configuration elements:
<add> element under <applicationPools>
For more information about IIS 7 configuration, see IIS 7.0: IIS Settings Schema on MSDN.
Use the following WMI classes, methods, or properties to perform this procedure:
- ApplicationPool.Create property
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.