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…


Using Windows Firewall to restrict access to Windows Azure instances

Summary: If you ever have a need to restrict access to your Windows Azure deployment to known IP address ranges, you can do this by programmatically modifying the Windows Firewall. You’ll need to do this both at startup, and whenever your role topology changes, as the Windows Azure guest agent also likes to modify firewall…

1

Keeping diagnostics in sync across Windows Azure instances

Windows Azure Diagnostics provides a great way for operations staff, developers and testers to find out what’s going on within a Windows Azure PaaS (Cloud Service) deployment. In a nutshell, it lets you specify what types of logs you are interested in (application logs, event logs, performance counters, or log files), and at specified intervals…


Automated Build and Deployment with Windows Azure SDK 1.6

A few months ago I posted on how to automate deployment of Windows Azure projects using MSBuild. While the approach documented in that post continues to work, Windows Azure SDK 1.6 has introduced some new capabilities for managing Windows Azure credentials and publishing settings which I wanted to leverage and build upon. With this new…

5

Updates to Windows Azure MSBuild post for SDK 1.5

Just a quick note that I’ve edited my previous post Using MSBuild to deploy to multiple Windows Azure environments based on some changes to the platform that have come with the Windows Azure SDK 1.5 and Windows Azure PowerShell cmdlets 2.0. The main changes are to the MSBuild targets added to the .ccproj file: The…

1