Network security group configuration for virtual machines

I like Azure, and since I worked with it in anger last a few years ago Microsoft have revised their portal (twice) and added lots and lots of new features. One that I really like is the “resource group” which is a way to logically group together Azure resources.

Inside a resource group it’s possible to create a Network Security Group. This is a neat container for combining together firewall rules and routing between network interfaces.

And this is where it all goes a bit wrong.

Continue reading “Network security group configuration for virtual machines”

WordPress on Azure

As I just mentioned in my last post, this ‘ere blog is running in Azure, because I’m a cheapskate and get free hosting from Microsoft.

But it wasn’t as easy as I’d thought.

In the day job I’m doing lots of Azure stuff again. Our esteemed leader wants us to use Platform-as-a-Service where we can, which makes sense as the firm I’m working with don’t want to write anything themselves if they can help it. Buy, not build is their mantra.

So I merrily went to Azure and chose Add New, “WordPress + MySQL”. Entered all the passwords (so many!) and left the wheels to spin. Whoops!

Continue reading “WordPress on Azure”

Game over: on Azure, don’t IISRESET

Like, I suspect, many other developers, I think I need to know more about my deployment environment than perhaps is good for me. But with PaaS (platform-as-a-service) hosting, sometimes that can give, well, unexpected results.

For example, Windows Azure offers a (really very handy) facility to open a Remote Desktop session to a Windows Server host that runs an Azure instance. You’re logged in as local Administrator, too, so you can cause some serious damage in there if you want.

Or even if you don’t want.

Many Windows developers get into the habit of performing an iisreset from time to time to gently shake a mis-behaving IIS host. This forces a complete restart of IIS and any accompanying ASP.NET applications.

Now, while this can sometimes be useful on a local machine — for instance, if you’ve sent your ASP.NET application into an infinite loop and just want to kill it quickly — it’s definitely not a good idea on a production server.

And on an Azure server… it looks like it stops the load balancer working, too, so you trash the instance completely as there’s no way to route traffic to it.

So if your Azure instance has got mixed up somehow, it’s obviously time to consider alternatives.

A rather useful utility (named by its author aspreset.exe) is here. Alternatively

  • make a whitespace change to web.config in the application root
  • use a file utility such as touch.exe to change the filetime of an assembly in the bin folder
  • use a Sysinternals tool e.g. pskill to kill the w3wp.exe process manually

Or if you can wait a while, simply recycle the instance and go and put the kettle on!