如何使用 MSDeploy 配置应用程序池 [英] How to configure Application Pool with MSDeploy

查看:20
本文介绍了如何使用 MSDeploy 配置应用程序池的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用 MSBuild 通过传入参数来创建 MSDeploy 包:

I'm currently using MSBuild to create an MSDeploy package by passing in arguments:

/p:DeployOnBuild=true;DeployTarget=Package

我正在使用 parameters.xml 文件(位于我网站的根目录).另一个问题 我发现尝试设置应用程序池.

I'm using a parameters.xml file (placed at the root of my website). Another SO question I found tries to set up the application pool.

我的parameters.xml文件:

My parameters.xml file:

<parameters>
    <parameter name="Application Pool Name" description="Application Pool for this site" tags="" defaultValue="ASP.NET v4.0">
        <parameterEntry kind="DeploymentObjectAttribute"
                        scope="application"
                        match="/application/@applicationPool" />
    </parameter>
...
</parameters>

但似乎 msbuild 生成的 msdeploy 包中的 archive.xml 文件没有包含 applicationPool 元素的部分

but it seems that the archive.xml file inside the msdeploy package generated by the msbuild doesn't have an section with an applicationPool element

我怎样才能用这个部分生成archive.xml,以便我可以设置应用程序池?

How can I get the archive.xml to be generated with this section so that I can set the application pool?

我要设置的应用程序池已经存在,所以我不关心 MSDeploy 同步或在这里创建应用程序池.

The app pool I want to set will exist already, so I'm not concerned with MSDeploy synching or creating app pools here.

我发现了这个问题 如何我是否通过 VS & 控制用于部署的 AppPoolMSDeploy 设置 提示使用 wpp.targets 生成自定义提供程序.我正在探索如何使用这种方法来修改archive.xml文件

I have found this question How do I control the AppPool used for deploy through VS & MSDeploy settings which hints at using wpp.targets to generate a custom provider. I'm exploring how to use this approach to modify the archive.xml file

推荐答案

假设您的项目具有正确的 IIS 设置并以管理员身份运行,您应该能够指定 IncludeIisSettings=true 以将设置包含在 zip 中.

Assuming you have the correct IIS settings on your project and are running as Administrator, you should be able to specify IncludeIisSettings=true to have the settings included in the zip.

如果您需要包含实际的 AppPool 定义(以便可以创建它),您还应该设置 IncludeAppPool=true.

If you need the actual AppPool definition included (so it can be created), you should also set IncludeAppPool=true.

这篇关于如何使用 MSDeploy 配置应用程序池的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆