This project is read-only.

How do you setup a new web application on an existing web site?

Feb 25, 2010 at 11:34 PM

I have a web site that I have already created that I would like to add a new application to. I have tried several different uses of the IIS7Website’s “AddApplication” action without any success. Here is my last attempt. The CreateWebSite ItemGroup has all of the data used for this call.

  <Target Name="ProvisionIIS7WebSite" DependsOnTargets="$(ProvisionIIS7WebSiteDependsOn)"

          Condition=" '@(CreateWebSite)' != '' " >

    <MSBuild.ExtensionPack.Web.Iis7Website TaskAction="AddApplication"

      Name="Default Web Site"




      AppPool="%(CreateWebSite.AppPool)" />


Feb 26, 2010 at 12:52 PM
You need to pass in the website name and the Applications to add as an Item.
<YOURAPPLICATION Include="/photos2">

<MSBuild.ExtensionPack.Web.Iis7Website TaskAction="AddApplication" Name="YOURWEBSITE" Applications="@(YOURAPPLICATION)"/>