【发布时间】:2020-01-11 03:14:29
【问题描述】:
我需要将 AppPool 的 StartMode 设置为 AlwaysRunning。
我可以继续在 IIS -> My-AppPool -> Advanced Settings 中更改该设置;但是我需要在每次发布后重做,这并不理想。
我使用 TFS 发布模板发布我的应用程序。我已经有一个 IIS Web App Manage 任务,可以使用 Additional appcmd.exe commands 部分来执行此操作:
set config "Default Web Site/Test" -section:applicationPools -[name='$(TestSite_AppPool)'].startMode:AlwaysRunning
一切正常,但是我收到以下错误:
ERROR ( message:Can not set attribute "startMode" to value "AlwaysRunning,".. Reason: This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
这是一个显示停止器还是可以在 TFS 模板中进行任何操作以使其正常工作?或者可能是语法问题?
【问题讨论】:
标签: iis-6 tfsbuild windows-server-2012