Last active
May 27, 2025 14:20
-
-
Save tcartwright/ae4c8d5b8bc5ba7a7a45196743e606d9 to your computer and use it in GitHub Desktop.
IIS: Configure web site to always be running, and never spin down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%windir%\system32\inetsrv\appcmd.exe set apppool "POOL_NAME" -startMode:AlwaysRunning | |
%windir%\system32\inetsrv\appcmd.exe set apppool "POOL_NAME" -processModel.idleTimeout:00:00:00 | |
%windir%\system32\inetsrv\appcmd.exe set apppool "POOL_NAME" -processModel.idleTimeoutAction:Suspend | |
%windir%\system32\inetsrv\appcmd.exe set app "SITE_NAME/" -preloadEnabled:true | |
%windir%\system32\inetsrv\appcmd.exe set site "SITE_NAME" -applicationDefaults.preloadEnabled:true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Obviously you will need to change the variables to match your situation | |
set config -section:applicationPools /[name='$(AppName)$(environment)'].startMode:"AlwaysRunning" /commit:apphost | |
set config -section:applicationPools /[name='$(AppName)$(environment)'].processModel.idleTimeout:"00:00:00" /commit:apphost | |
set config -section:applicationPools /[name='$(AppName)$(environment)'].processModel.idleTimeoutAction:"Suspend" /commit:apphost | |
set config -section:system.applicationHost/sites /[name='$(AppName).$(environment).$(domain)'].application[@path='/'].preloadEnabled:"true" /commit:apphost | |
set config -section:system.applicationHost/sites /[name='$(AppName).$(environment).$(domain)'].applicationDefaults.preloadEnabled:"true" /commit:apphost | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment