Reputation: 1023
I need to set my AppPool's StartMode to AlwaysRunning.
I can go ahead and change that setting in IIS -> My-AppPool -> Advanced Settings fine; however I would need to redo it after each release, which is not ideal.
I release my app using TFS release template. I already have an IIS Web App Manage task in there and could use the Additional appcmd.exe commands section to do this:
set config "Default Web Site/Test" -section:applicationPools -[name='$(TestSite_AppPool)'].startMode:AlwaysRunning
All good, however I am getting the following error:
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".
Is this a show-stopper or anything could be done within the TFS template to make it work? Or maybe it is a syntax problem?
Upvotes: 1
Views: 848
Reputation: 1023
Turned out to be a syntax problem and this works instead:
set apppool "TestSite_AppPooll" /autoStart:true /startMode:AlwaysRunning
Upvotes: 1