【问题标题】:Set IIS AppPool StartMode property using TFS release template使用 TFS 发布模板设置 IIS AppPool StartMode 属性
【发布时间】: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


    【解决方案1】:

    原来是语法问题,这可以代替:

    set apppool "TestSite_AppPooll" /autoStart:true /startMode:AlwaysRunning 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-03-29
      • 1970-01-01
      • 2013-01-30
      • 2021-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多