How do I target an already existing application pool with webdeploy?
Asked Answered
J

1

12

I am trying to make sure that my app gets deployed to a specific application pool that already exists when using Web Deploy. The application pool should be configurable by the user using the GUI when installing app through IIS Manager or by changing the value in the .setparameters.xml file when installing via the commandline from a web package. Inserting the following parameter entry into my parameters.xml doesn't do the trick.

<parameter name="Application Pool" description="Application Pool for this site" tags="iisApp" defaultValue="ASP.NET v4.0">
    <parameterEntry kind="providerPath" scope="IisApp" match="applicationPool" />
</parameter>

Is there a straightforward way to accomplish this? If not, how would I go about getting this done?

Jemmie answered 2/4, 2013 at 20:52 Comment(0)
T
9

Here's what I did to set the application pool via command line or SetParameters.xml after lots of reading on SO and elsewhere:

  1. Add a Parameters.xml file to the project.

    <?xml version="1.0" encoding="utf-8" ?>
    <parameters>
      <parameter name="AppPool" defaultValue="ASP.NET 4.0">
        <parameterEntry kind="DeploymentObjectAttribute" scope="application" match="applicationPool/@applicationPool" />
      </parameter>
    </parameters>
    
  2. Add two parameters to msbuild when creating the package:

    /P:IncludeIisSettings=true
    /P:IncludeAppPool=true
    
  3. Set via SetParameters.xml:

    <setParameter name="AppPool" value="Some AppPoolName"/>
    

    OR

    Using command line parameter (msdeploy or *.deploy.cmd):

    "-setParam:'AppPool'='Some AppPoolName'"
    
Thane answered 17/5, 2013 at 19:43 Comment(1)
when include these parameters, I got error MSB4044: The "EscapeTextForRegularExpressions" task was not given a value for the required parameter "Text". when try buildMalraux

© 2022 - 2024 — McMap. All rights reserved.