#19140: Fixing Azure startup task on local emulator

Work Item: 19140

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-10-15 11:37:19 -07:00
parent b87f70f20f
commit b44cffa440
2 changed files with 19 additions and 2 deletions

View File

@@ -18,7 +18,20 @@
<InputEndpoint name="HttpIn" protocol="http" port="80" />
</Endpoints>
<Startup>
<Task commandLine="Startup\ConfigureIIS.cmd" executionContext="elevated" taskType="simple" />
<Task commandLine="Startup\ConfigureIIS.cmd" executionContext="elevated" taskType="simple">
<Environment>
<!-- Create the environment variable that informs the startup task whether it is running
in the Compute Emulator or in the cloud. "%ComputeEmulatorRunning%"=="true" when
running in the Compute Emulator, "%ComputeEmulatorRunning%"=="false" when running
in the cloud. -->
<Variable name="ComputeEmulatorRunning">
<RoleInstanceValue xpath="/RoleEnvironment/Deployment/@emulated" />
</Variable>
</Environment>
</Task>
</Startup>
</WebRole>
</ServiceDefinition>

View File

@@ -1 +1,5 @@
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.processModel.idleTimeout:00:00:00
REM Check if this task is running on the compute emulator, if not then sets the Idle Timeout to zero
IF "%ComputeEmulatorRunning%" == "true" (
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.processModel.idleTimeout:00:00:00
)