Start Up Tasks and Elevated Permissions in Windows Azure

Slalom Consultant Joel Forman

Slalom Consultant Joel Forman specializes in cloud computing and the Windows Azure Platform.

With the November 2010 release of the Windows Azure Platform (1.3 SDK) came several new features to assist developers in packaging their new and existing applications for Windows Azure.

A developer now has the capability to specify tasks that should be run as a Web or Worker role starts up to assist in the installation and initialization of an application.  Before, a developer might have done this type of work in Application_Start or the OnStart method of the RoleEntryPoint, and had to launch process from .NET.  Moreover, it was common to run into permissions problems depending if the task required elevated permissions.  Now, you can specify these tasks as part of your ServiceDefinition.csdef file.   You also can specify whether these tasks need to run under elevation permissions, to get around those permissions issues.  It is important to note that your role will not run under elevated permissions, just the task.

Here are some great posts on Start Up tasks from Steve Marx, who goes into more detail and offers some tips and tricks:

The “Debug locally with start /w cmd” trick that he describes has come in very handy for me personally.  It is a great way to work through and build your script locally, and feel confident that it will work when deploying it.

One other great feature that I will talk about in a future post is the ability to access your roles via Remote Desktop.  This can be used hand in hand with Start Up tasks to see the state of your role after your task has run.

The orchestration of the steps to install and initialize your applications has just gotten a lot easier with these new features.

– Joel

Follow Joel on Twitter: @seattlejoel.

Slalom Consulting's Seattle Office Slalom Consulting Cloud
More about Slalom Consulting’s Seattle office. More about Slalom Consulting’s Cloud focus.

subscribe by emailSubscribe to be emailed about new Cloud posts.

About Joel Forman
Joel Forman is a Solution Architect at Slalom Consulting and specializes in cloud computing and the Windows Azure Platform.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: