
WScript.Echo("\nCreating application pool named W3SVC/AppPools/" + appPoolName) appPoolName is of the form "", for example, "MyAppPool" serverName is of the form "", for example "Localhost"

CleanUp("Localhost", "W3SVC/1/ROOT/MyVDir", "MyAppPool") įunction CreateAppPool(serverName, appPoolName) CreateAppPool("Localhost", "MyAppPool") ĬreateVDir("Localhost", "W3SVC/1/Root", "MyVDir", "D:\\Inetpub\\Wwwroot") ĪssignVDirToAppPool("Localhost", "W3SVC/1/ROOT/MyVDir", "MyAppPool")
#How to create a application pool in iis code
The following code example uses the JScript programming language to perform the following actions.Ĭreate a new application pool called MyAppPool.Ĭreate a new virtual directory called MyVDir in the default Web site.Īssign the new virtual directory to the new application pool.įor a code example that uses System.DirectoryServices that performs these actions, see Creating Application Pools Using System.DirectoryServices.įor this code to work, the IIS server must be running in worker process isolation mode because application pools do not exist in IIS 5.0 isolation mode. IIS 5.1 and earlier: The AppCreate3 method, the IIS WMI provider, and Application pools are not available, and therefore this topic does not apply. The new site or virtual directory can be put in a new application pool to isolate it from other applications on the server. Some ISPs use forms to programmatically sign up a new customer and add a new Web site or virtual directory for them.
#How to create a application pool in iis full
name : Return information about an existing application pool _iis_webapppool : name : DefaultAppPool state : present - name : Create a new application pool in 'Started' state _iis_webapppool : name : AppPool state : started - name : Stop an application pool _iis_webapppool : name : AppPool state : stopped - name : Restart an application pool (non-idempotent) _iis_webapppool : name : AppPool state : restarted - name : Change application pool attributes using new dict style _iis_webapppool : name : AppPool attributes : managedRuntimeVersion : v4.0 autoStart : no - name : Creates an application pool, sets attributes and starts it _iis_webapppool : name : AnotherAppPool state : started attributes : managedRuntimeVersion : v4.0 autoStart : no # In the below example we are setting attributes in child element processModel # - name : Manage child element and set identity of application pool _iis_webapppool : name : IdentitiyAppPool state : started attributes : managedPipelineMode : Classic processModel.identityType : SpecificUser erName : ' ' processModel.loadUserProfile : true - name : Manage a timespan attribute _iis_webapppool : name : TimespanAppPool state : started attributes : # Timespan with full string "day:hour:minute:second.millisecond" : "00:00:05:00.000000" : # Shortened timespan "hour:minute:second" processModel.Internet Service Providers (ISPs), who provide Web hosting services to customers, need to configure their IIS servers frequently.

