12.19. Creating Application Pools
You want to create a new application pool.
Using a graphical user interface
Open Internet Information Services (IIS) Manager.
In the left pane, expand the server node in the console tree and select Application Pools.
Right-click on Application Pools and select New → Application Pool.
Type a descriptive name for the new pool.
Choose whether to use an existing pool as a template (select the existing pool whose configuration settings you want to copy) or leave the configuration settings for the new pool at their default values.
Click OK to create the new pool.
' This code creates an app pool. ' ------ SCRIPT CONFIGURATION ------ strComputer = "
<ServerName>" strAppPoolName = "
<AppPoolName>" ' ------ END CONFIGURATION --------- set objAppPools = GetObject("IIS://" & strComputer & "/w3svc/AppPools") set objNewAppPool = objAppPools.Create("IIsApplicationPool", strAppPoolName) ' Recycle this app pool every 2,000 requests objNewAppPool.AppPoolRecycleRequests = True objNewAppPool.PeriodicRestartRequests = 2000 ' Run this app pool as NETWORK SERVICE (just like the default app pool) objNewAppPool.AppPoolIdentityType = 2 ' Save new app pool objNewAppPool.SetInfo( ) WScript.Echo "App Pool created successfully: " & objNewAppPool.Name
Application pools are used to assign worker processes for dynamic applications running on IIS. An application pool can have one or more worker processes servicing one or more applications assigned ...