Iis7AppPool Class

MSBuild Extension Pack

Iis7AppPool Class MSBuild Extension Pack Help 4.0.12.0
Valid TaskActions are:

CheckExists (Required: Name Output: Exists)

Create (Required: Name Optional: Force, IdentityType, UseDefaultIdentity, PoolIdentity, IdentityPassword, ManagedRuntimeVersion, AutoStart, Enable32BitAppOnWin64, PipelineMode, QueueLength, IdleTimeout, PeriodicRestartPrivateMemory, PeriodicRestartTime, MaxProcesses, RecycleRequests, RecycleInterval, RecycleTimes, RapidFailProtection, LoadUserProfile)

Delete (Required: Name)

GetInfo (Required: Name)

Modify (Required: Name Optional: Force, ManagedRuntimeVersion, AutoStart, Enable32BitAppOnWin64, QueueLength, IdleTimeout, PeriodicRestartPrivateMemory, PeriodicRestartTime, MaxProcesses, RecycleRequests, RecycleInterval, RecycleTimes, RapidFailProtection, LoadUserProfile)

Recycle (Required: Name)

SetIdentity (Optional: UseDefaultIdentity, IdentityType, PoolIdentity, IdentityPassword)

SetPipelineMode (Optional: PipelineMode)

Start (Required: Name Optional: RetryCount)

Stop (Required: Name)

Remote Execution Support: Yes

Inheritance Hierarchy

SystemObject  Microsoft.Build.UtilitiesTask
    MSBuild.ExtensionPackBaseTask
      MSBuild.ExtensionPack.WebIis7AppPool

Namespace: MSBuild.ExtensionPack.Web
Assembly: MSBuild.ExtensionPack.Iis7 (in MSBuild.ExtensionPack.Iis7.dll) Version: 4.0.0.0

The Iis7AppPool type exposes the following members.

Constructors

  NameDescription
Public methodIis7AppPool
Top
Properties

  NameDescription
Public propertyAppPoolInfo
Gets the AppPoolInfo Item. Identity = Name, MetaData = ApplicationPoolName, PhysicalPath, Id, State
Public propertyAutoStart
Set whether the application pool should start automatically. Default is true.
Public propertyEnable32BitAppOnWin64
Sets whether 32-bit applications are enabled on 64-bit processors. Default is false.
Public propertyExists
Gets whether the Application Pool exists
Public propertyForce
Set to true to force the creation of a website, even if it exists.
Public propertyIdentityPassword
Sets the password associated with the PoolIdentity property.
Public propertyIdentityType
Sets the ProcessModelIdentityType. Default is LocalService unless UseDefaultIdentity is specified
Public propertyIdleTimeout
Sets a TimeSpan value in minutes for the period of time a process should remain idle. Set > 0 to use. Set to -1 to restore the Application Pool Default.
Public propertyLoadUserProfile
Sets the LoadUserProfile property. Default is false.
Public propertyManagedRuntimeVersion
Sets the version number of the .NET Framework used by the application pool. Default is "v2.0".
Public propertyMaxProcesses
Sets the maximum number of worker processes allowed for the AppPool. Set to -1 to restore the Application Pool Default.
Public propertyName
Sets the name of the AppPool
Public propertyPeriodicRestartPrivateMemory
Sets the private memory (kb) a process can use before the process is recycled. Default is 0. Set > 0 to use. Set to -1 to restore the Application Pool Default.
Public propertyPeriodicRestartTime
Sets a TimeSpan value in minutes for the period of time that should elapse before a worker process is recycled. Default is 29 hours. Set > 0 to use. Set to -1 to restore the Application Pool Default for Modify or -1 to Disable Recycling.PeriodicRestartTime for Create
Public propertyPipelineMode
Sets the ManagedPipelineMode. Default is ManagedPipelineMode.Integrated.
Public propertyPoolIdentity
Sets the user name associated with the security identity under which the application pool runs.
Public propertyQueueLength
Sets the maximum number of requests to queue before rejecting additional requests. Default is 0. Set > 0 to use. Set to -1 to restore the Application Pool Default.
Public propertyRapidFailProtection
Sets the RapidFailProtection. Default is true
Public propertyRecycleInterval
Sets the RecycleInterval in minutes for the application pool. Set to -1 to restore the Application Pool Default.
Public propertyRecycleRequests
Sets the fixed number of requests to recycle the application pool. Set to -1 to restore the Application Pool Default.
Public propertyRecycleTimes
Sets the times that the application pool should recycle. Format is 'hh:mm,hh:mm,hh:mm'. Set to "-1" to clear the RecycleTimes
Public propertyRetryCount
Sets a value indicating how many times to retry starting or stopping an application pool, e.g. if the pool needs time to stop. Default is 5. The retry occurs every 1 seconds.
Public propertyUseDefaultIdentity
Sets whether to use the default settings for ProcessModel Identity that have been defined in IIS for an AppPool. Default is false.
Top
Examples

<Project ToolsVersion="4.0" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <TPath>$(MSBuildProjectDirectory)\..\MSBuild.ExtensionPack.tasks</TPath>
        <TPath Condition="Exists('$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks')">$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks</TPath>
    </PropertyGroup>
    <Import Project="$(TPath)"/>
    <Target Name="Default">
        <!-- Create an AppPool -->
        <MSBuild.ExtensionPack.Web.Iis7AppPool TaskAction="Create" Name="NewAppPool100" RecycleRequests="45" RecycleInterval="1987" Force="true" MaxProcesses="5"/>
        <!-- Modify an AppPool -->
        <MSBuild.ExtensionPack.Web.Iis7AppPool TaskAction="Modify" Name="NewAppPool100" RecycleRequests="-1" RecycleInterval="-1"/>
        <MSBuild.ExtensionPack.Web.Iis7AppPool TaskAction="Create" Name="NewAppPool200" Force="true"  MaxProcesses="4" IdentityType="SpecificUser" PoolIdentity="MiniMe" IdentityPassword="MiniPass" QueueLength="400" IdleTimeOut="5000"/>
        <MSBuild.ExtensionPack.Web.Iis7AppPool TaskAction="Modify" Name="NewAppPool200" RecycleRequests="222" RecycleInterval="443" RecycleTimes="07:33,08:44,17:54" MaxProcesses="3"  QueueLength="598"/>
        <!-- Set the PipelineMode in the AppPool -->
        <MSBuild.ExtensionPack.Web.Iis7AppPool TaskAction="SetPipelineMode" Name="NewAppPool200" PipelineMode="Classic"/>
        <MSBuild.ExtensionPack.Web.Iis7AppPool TaskAction="SetPipelineMode" Name="NewAppPool200" PipelineMode="Integrated"/>
        <!-- Set the Identity for the AppPool -->
        <MSBuild.ExtensionPack.Web.Iis7AppPool TaskAction="SetIdentity" Name="NewAppPool200" IdentityType="LocalService"/>
    </Target>
</Project>
See Also

Reference