Applying a “Web and Worker Roles” pattern to the Azure App Service

Summary: A common use for Azure Cloud Services is to implement services that utilise a “web and worker role” pattern to offload complex processing to async workers. This article describes how you can implement the same pattern with the Azure App Service. This article is from Tom Hollander’s blog. Azure Cloud Services was one of…


Applying some DevOps Rigour to Azure Websites’ AppSettings

Summary: Configuring Azure Websites Application Settings in the portal is fine for quick and dirty prototypes, but for anything serious you need to apply some DevOps rigour. This post describes how you can store your Application Settings into a per-environment JSON file that can be checked into source control and automatically applied to your website…

4

Unattended authentication to Azure Management APIs with Azure Active Directory

19/06/2015: See also this new post explaining how to authenticate using Certificates to call the Azure Resource Manager APIs from .NET. Updated 29/11/2014 with info on authenticating to APIs from PowerShell Microsoft Azure provides two management APIs, the older Service Management API and the new Azure Resource Manager API. Both are REST APIs (that also…


A/B Testing with Azure Websites

In the context of websites, A/B testing, or Testing In Production, is a technique whereby different users of a website will be randomly presented with different versions of the site. This is commonly used to test proposed enhancements with a limited number of real users, allowing the website owner to measure the effectiveness before the…

5

Deploying multiple virtual directories to a single Azure Website

Since the beginning of time, IIS has allowed you to configure multiple virtual directories and applications within a single website. There are a bunch of situations where this is useful, but let’s go with a common example. Suppose I have a website than has a bunch of pages, and a REST API which is accessed…

3

Windows Azure in Australia: Facts and Rumours

Today, Microsoft has made the long-awaited announcement that Windows Azure is coming to Australia! Of course it’s been possible for Aussies to deploy and use applications in Windows Azure for some time, but this has always required deploying to overseas data centres. This announcement is about the upcoming availability of two new Windows Azure sub-regions…

5

Keep your Windows Azure applications running with custom health checks

Summary: Even though Windows Azure does a great job of keeping your VMs running, only you know exactly what it means for your own apps to be healthy. This post and sample code shows a pattern for implementing custom health checks that can report the health of your application, recover from failures if possible, and…


Running scripts from a Windows Azure role’s OnStart method

Summary: Startup scripts declared in ServiceDefinition.csdef work well in most cases, but if you need to modify IIS configuration you’ll need to run your scripts from your role’s OnStart method. This post includes some sample code that can do this using a configuration-driven declarative approach. In a Windows Azure cloud service, you can specify scripts…

1

Using XPath to set environment variables in ServiceDefinition.csdef

In my last post on zipping IIS log files in Windows Azure, my ServiceDefinition.csdef file included the following code to set an environment variable to the value of a local resource path: <Task commandLine="Startup\ScheduleLogFileZipAndDeleteTask.cmd" executionContext="elevated" taskType="simple"> <Environment> <Variable name="ZippedLogFilesPath"> <RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/LocalResources/LocalResource[@name=’ZippedLogFiles’]/@path" /> </Variable> </Environment> </Task> As you can see, an XPath query is used to…


Zip your IIS log files before transferring with Windows Azure Diagnostics

Summary: If your Windows Azure-hosted website is really popular, the IIS log files can start to get pretty big. To prevent them from filling up your local VM’s quota and to minimise storage size and transfer bandwidth, you can zip the log files before Windows Azure Diagnostics transfers them to blob storage. One of the…