Skip to content

Instantly share code, notes, and snippets.

@RyannosaurusRex
Last active October 8, 2015 01:58
Show Gist options
  • Save RyannosaurusRex/3260225 to your computer and use it in GitHub Desktop.
Save RyannosaurusRex/3260225 to your computer and use it in GitHub Desktop.
Disable timeout of IIS on an Azure web role.
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.processModel.idleTimeout:00:00:00
<!-- This is added under your WebRole section. The commandline should be the path to the file, which starts at the root of the project that is your WebRole. -->
<Startup>
<Task commandLine="startup\disableTimeout.cmd" executionContext="elevated" taskType="background"/>
</Startup>
@RyannosaurusRex
Copy link
Author

DO NOT CREATE THE .CMD FILE IN VISUAL STUDIO! For some reason, VS adds some things that makes this not work in Azure if the file is created in VS. Create it in Notepad first, then add it to the project. Editing the file afterwards seems to work, though, it's only the creation that's jacked up in VS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment