Please enable JavaScript.
Coggle requires JavaScript to display documents.
1.3 Azure Role Life Cycle (Startup Task (Task Types (simple - executed…
1.3 Azure Role Life Cycle
Windows Azure
Platform as a service (PaaS)
Infrastructure as a service (IaaS) is similar to traditional hosting
tools
AppCmd.exe
command-line tool is used in Windows Azure to manage IIS settings at startup
Startup Task
OnStart()
App_Start()
Run() = Main()
OnEnd()
Startup Task is defined in Task element (a node of Startup element) in ServiceDefinition.csdef
<startup><task taskType="simple|background|foreground"/></startup>
Task Types
simple - executed synchronously
background - started asynchronously,
does not keep
the role running until the task ends
foreground - started asynchronously, keeps the role running until the task ends
Events
:
Run Startup Tasks;
1) OnStart;
2) Run;
3) OnEnd;
Startup tasks can be batch-files, console files,or batch files that run Windows PowerShell, installers additional software or third-party tools.
Startup tasks can be run more than once, hance misconfiguring appCmd.exe can cause runtime errors
Windows Azure Roles
Web role - IIS (StartupTask is available)
Worker role - middle-tier application without IIS (StartupTask is available)
VM role - VM instance (StartupTask is
not
available) Windows Azure VM are stateless =
registry information
will not be persisted next time the role restarts