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

后端 未结 1 970
一向
一向 2020-12-10 04:44

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 t

相关标签:
1条回答
  • 2020-12-10 05:44

    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>
      
      • Sources:
        • How to specify MSDeploy parameters from MSbuild
        • http://vishaljoshi.blogspot.com/2010/07/web-deploy-parameterization-in-action.html
    2. Add two parameters to msbuild when creating the package:

      /P:IncludeIisSettings=true
      /P:IncludeAppPool=true
      
      • Source:
        • https://stackoverflow.com/a/13678143/448876
    3. Set via SetParameters.xml:

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

      OR

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

      "-setParam:'AppPool'='Some AppPoolName'"
      
    0 讨论(0)
提交回复
热议问题