We have a Web Role that we are hosting in Windows Azure that uses an old ASMX based Web Reference to contact an external system. The Web Reference proxy code is big enough
I like the solution from Steve Marx.
Add this lines to ServiceDefinition.csdef:
And add disableTimeout.cmd in a folder called startup, with the following line of code:
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.processModel.idleTimeout:00:00:00
Original solution from here: http://blog.smarx.com/posts/controlling-application-pool-idle-timeouts-in-windows-azure
When running in the emulator please read this: http://blog.smarx.com/posts/skipping-windows-azure-startup-tasks-when-running-in-the-emulator