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

此生再无相见时 提交于 2019-11-28 10:03:16
absynce

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'"
    
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!