Iis6AppPool Class

MSBuild Extension Pack

Iis6AppPool Class MSBuild Extension Pack Help 4.0.12.0
Valid TaskActions are:

Create (Required: Name Optional: Properties)

CheckExists (Required: Name Output: Exists)

Delete (Required: Name)

GetMetabasePropertyValue (Required: Name, MetabasePropertyNameOutput: MetabasePropertyValue)

Modify (Required: Name, Properties)

Recycle (Required: Name)

Start (Required: Name)

Stop (Required: Name)

Remote Execution Support: Yes. Please note that the machine you execute from must have IIS installed.

Inheritance Hierarchy

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

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

The Iis6AppPool type exposes the following members.

Constructors

  NameDescription
Public methodIis6AppPool
Top
Properties

  NameDescription
Public propertyExists
Gets whether the app pool exists. Output
Public propertyMetabasePropertyName
Sets the Metabase Property Name to retrieve. See Metabase Property Reference (IIS 6.0)

Public propertyMetabasePropertyValue
Gets the string value of the requested MetabasePropertyName
Public propertyName
Sets the name of the AppPool. Required.
Public propertyProperties
Sets the Properties. Use a semi-colon delimiter. See Metabase Property Reference (IIS 6.0) If a property contains =, enter #~# as a special sequence which will be replaced with = during processing
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">
        <!-- Delete an AppPool -->
        <MSBuild.ExtensionPack.Web.Iis6AppPool TaskAction="Delete" Name="AnAppPool"/>
        <!-- Create an AppPool -->
        <MSBuild.ExtensionPack.Web.Iis6AppPool TaskAction="Create" Name="AnAppPool" Properties="AppPoolAutoStart=TRUE;PeriodicRestartTime=0;PeriodicRestartRequests=0;PeriodicRestartMemory=0;PeriodicRestartPrivateMemory=0;PeriodicRestartSchedule=04:00;IdleTimeout=0;AppPoolQueueLength=2000;CPULimit=0;CPUResetInterval=5;CPUAction=0;MaxProcesses=1;PingingEnabled=TRUE;PingInterval=60;PingResponseTime=90;RapidFailProtection=FALSE;RapidFailProtectionMaxCrashes=5;RapidFailProtectionInterval=5;StartupTimeLimit=60;ShutdownTimeLimit=60;AppPoolIdentityType=3;"/>
        <!-- Modify an AppPool -->
        <MSBuild.ExtensionPack.Web.Iis6AppPool TaskAction="Modify" Name="AnAppPool" Properties="AppPoolAutoStart=TRUE;PeriodicRestartTime=0;PeriodicRestartRequests=0;PeriodicRestartMemory=0;PeriodicRestartPrivateMemory=0;PeriodicRestartSchedule=04:00;IdleTimeout=0;AppPoolQueueLength=1952;CPULimit=0;CPUResetInterval=5;CPUAction=0;MaxProcesses=6;PingingEnabled=TRUE;PingInterval=60;PingResponseTime=90;RapidFailProtection=FALSE;RapidFailProtectionMaxCrashes=5;RapidFailProtectionInterval=5;StartupTimeLimit=60;ShutdownTimeLimit=60;AppPoolIdentityType=3;"/>
        <!-- Check whether an AppPool exists -->
        <MSBuild.ExtensionPack.Web.Iis6AppPool TaskAction="CheckExists" Name="AnAppPool">
            <Output PropertyName="DoesExist" TaskParameter="Exists"/>
        </MSBuild.ExtensionPack.Web.Iis6AppPool>
        <Message Text="AnAppPool exists: $(DoesExist)"/>
        <!-- GetMetabasePropertyValue -->
        <MSBuild.ExtensionPack.Web.Iis6AppPool TaskAction="GetMetabasePropertyValue" Name="DefaultAppPool" MetabasePropertyName="AppPoolState">
            <Output PropertyName="AppPoolState" TaskParameter="MetabasePropertyValue"/>
        </MSBuild.ExtensionPack.Web.Iis6AppPool>
        <Message Text="AppPoolState: $(AppPoolState)"/>
    </Target>
</Project>
See Also

Reference