Installing the Reverse Proxy site extension

I recently created the Reverse Proxy site extension which configures your Azure WebApp to act as a reverse proxy and forward web request to other URL’s based on the incoming request URL path.

The extension enables the proxy in the applicationhost.config file of your WebApp. You can configure the proxy by adding rewrite rules in your web.config file.

To enable this extension on your webapp, go to the new portal ( and find the webapp you would like to extend.

Click on “All settings” and select “Extensions”

Reverse Proxy Site Extension install

Click on the “Add” button and select the ReverseProxy site extension.

Select Reverse Proxy site extension

After accepting the legal terms (don’t worry its open source) the extension will be installed.
Reverse Proxy site extension installed

Clicking on the “Browse” button will open the ReverseProxy page of your site, where you can add or edit the proxy rules. This page is just a first step. I hope to create a better experience in the near future. Because you’re already logged in to the azure portal you don’t need to login again for this page.
Reverse Proxy create rules

If your site doesn’t have a web.config yet, it will automatically create one with the above example. This example adds a virtual “ch9″ folder to your site and the content in this folder will be pulled from the channel9 site. (This is just a simple example, a lot of links in the channel9 site will not work. See github documentation for more advanced examples).

If you already have a web.config, the site extension will not mess with it until you put in a rule and click the “Save to web.config” button.

You can find more examples of rewrite rules on the GitHub page of this site extension:

More details about IIS and Reverse Proxy can be found here.

Tools to help you migrate to Azure

As a consultant primarily focused on Azure I get a lot of different new projects to give advice on how to migrate to Azure.

The first thing I always try to do is to get an overview of all the things running and find things that might run us in to trouble. The project team and documentation is obviously a good way to start. But to solve this problem quickly, I created a list of tools to help me get an overview.

I don’t recommend to use these tools to [next, next, finish] your production workloads to Azure (some of them are not even capable of doing that). But these tools can be very helpful to quickly get some insight of the work that needs to be done.

Azure Websites Migration Assistant
This tool can be utilized to migrate sites from any Windows web server (Linux coming soon!) to Azure web sites. As part of the migration the tool can create sites and databases if the site needs it on Azure, publish content and publish your database. The minimum supported version of web server is windows 2003 with IIS 6. More info:

Microsoft Assessment and Planning Toolkit (MAP)
An agent less inventory, assessment, and reporting tool that can securely assess IT environments for various platform migrations. Download:
You can find more info on this blog:

Migrating to SQL Azure databases
SQL Database Migration Wizard (SQLAzureMW) is designed to help you migrate your SQL Server 2005/2008/2012/2014 databases to Azure SQL Database. More info:

Azure Virtual Machines Cost Estimator Tool
This tool helps you profile an existing on-premises infrastructure and estimate cost of running it on Azure. The tool supports:

  • Microsoft technologies (Hyper-V, SCVMM)
  • VMware technologies (vCenter, ESXi)
  • Physical environments (Windows, Linux)



Manage your Azure resources with PowerShell

PowerShell is a great tool for automating simple tasks and also works with Windows Azure.
I personally use it to start and stop a Virtual Machine which I’m not using on a regular basis to save some money. By using these scripts I don’t have to login to the portal anymore to start and stop the VM. There are a lot of other usages for PowerShell and Azure, but I will get to that later.

Let’s start with setting up PowerShell and Azure (you only have to do this once). First you need to install Windows Azure PowerShell, by downloading it here.

The Web Platform Installer installs all dependencies for the Windows Azure PowerShell cmdlets. After installing you need to setup your Azure subscription so that it can be used to manage your services. You can do this by opening a PowerShell command prompt and type:

After hitting “enter” a browser window opens and (after you logged in) will prompt you to download the .publishsettings file.

Azure Portal download publishsettings file powershell

Once saved, I used the Import-AzurePublishSettingsFile to imports the .publishsettings file for use by PowerShell. This file includes a management certificate that contains the security credentials.


Now you’re all set to manage your Azure resources from within PowerShell.

Here are some commands to get you started:
To view your Virtual Machines:

To start a VM:
Start-AzureVM -Name “VMName” -ServiceName “ServiceName”

To stop a VM (The -Force will deallocate your VM, this status will not incur any compute costs.):
Stop-AzureVM -Name “VMName” -ServiceName “ServiceName” -Force

View a list of your Azure Websites:

Details of an Azure Website
Get-AzureWebsite -Name <websitename>

Scale your Azure Website to 2 nodes:
Set-AzureWebsite -Name <websitename> -NumberOfWorkers 2

You can find a list of all the commands over here:

For more inspiration on what you can do with PowerShell and Azure I recommend to look at the Script Center:

Remotely debug your Azure Websites with Visual Studio 2013

Today the new version of Visual Studio (version 2013) will be officially launched. With this new version it becomes very easy to remotely debug your Windows Azure Websites.

In order to remotely debug your site you will need to download and install the following:

  • Visual Studio 2013 (I used the release candidate of the Premium edition).
  • And the Azure SDK 2.2


Here is how you do it
First you need to deploy your site in debug build configuration, otherwise you’re breakpoints won’t be hit.

Next you need to add your Azure subscription to Visual Studio so you can manage your subscription from within Visual Studio 2013.

To add you need to right click on “Windows Azure” in the Server Explorer (Ctrl+W,L) and select “Import Subscriptions…”

Select Import Subcriptions... to start adding your Azure subscription to Visual Studio 2013

Import Subscriptions…

A popup will appear.

Download and Import your subscription into VS2013

Download and Import your subscription into VS2013

If you haven’t downloaded your subscription file before, you can download it via the “Download subscription file” (1).

After downloading you can select that file via Browse (2), and click on Import (3).

When the import was successful, you can manage all your Azure services from within Visual Studio.

Now you can see your Web Sites under the Windows Azure node in Server Explorer. Right click on the site that you would like to debug and select Attach Debugger. When this is invoked the remote debugging agent will be started on your web site.

Attach the remote debugger to your Azure Website in Visual Studio 2013

Attach the remote debugger to your Azure Website in Visual Studio 2013

When the debugger is attached ALL the breakpoints from every request to the site will be hit. So don’t use this on a site with a lot of users :-)

To filter the requests from only your IP address you can add a filter to your breakpoint by right clicking on your breakpoint and select “Condition…”.

Add breakpoint filter

Add breakpoint filter

The following popup will appear.

Filter on IP Address

Filter on IP Address

As you can see in my code above, I assigned the Request.UserHostAddressip to a local variable ip.
string ip = Request.UserHostAddress;
So now I can add the condition to check if ip is my IP address. The breakpoint will only be hit if this condition is true.

It would be a lot easier to set the condition to: Request.UserHostAddress == "", but that didn’t work… Probably because the debugger doesn’t have the Request object in scope. Do you have a better idea?

Innoveer jij mee – Windows Azure Mobile services

Donderdag 17 oktober is er, op ons hoofdkantoor in Nieuwegein, een Ordina innoveer jij mee sessie die voor iedereen toegankelijk is over Windows Azure Mobile services. Kom jij ook?

Windows Azure Mobile services
Mobiele apps zijn niet meer weg te denken. Maar voor de goede werking van die apps is vaak een backend nodig om gegevens op te slaan, push notificaties te kunnen versturen en gebruikers te kunnen authentiseren. Windows Azure Mobile Services maakt het eenvoudiger om snel mobiele apps te maken met Windows Azure als backend. Dit platform beperkt zich niet alleen tot Windows Phone 8 en Windows 8, maar ook iOS en Android worden ondersteund.

Tijdens deze sessie zal met demo’s getoond worden hoe je mobiele app eenvoudig gebruik kan maken van Windows Azure Mobile Services. Onder andere het opslaan van je gegevens in een Windows Azure SQL database en het toevoegen van Push notificaties aan je applicatie komen aan bod. Al deze taken worden door het gebruik van de Windows Azure Mobile services een stuk eenvoudiger gemaakt.

Meld je aan via de site van Ordina

Working with the auto-scaling feature for Windows Azure Websites

On the Build conference Microsoft announced a new feature called auto-scaling. This enables you to setup automatic scale rules based on the activity of your instances – allowing you to automatically scale down (and save money) when they are below a CPU threshold you define, and automatically scale up quickly when traffic increases.

The auto-scaling feature is also available for Cloud Services and Virtual Machines, but in this post I’m only going to talk about Azure Web Sites.

To set up a new rule you log in to the portal. Go to the web site you want to automatically scale and click on the tab “Scale”. The feature is only available in the STANDARD mode.
In the picture below I configured my test website (called “autoscale”) to use a minimum of 1 instance and a maximum of 4 instances.
The Target CPU slides says it will scale up when the average CPU utilization comes above 75 percent and will scale down an instance if the utilization drops below 30 percent.


In the gray box you can read “Autoscale has reduced your costs by up to 50%“. This is Microsofts way of saying that you’re using 2 instances (50% of my maximum of 4).

In the graph you can see I have been testing the service by doing some load test on the site. In general the autoscaling feature worked great. Only thing I noticed is that it sometimes takes up to 30 minutes before the site scaled up.

Great new Azure announcements @Teched 2013 North America

Last week was Teched 2013 North America, and there were a lot of exciting new announcements made by Microsoft. If you have 3 hours to spare… watch the complete keynote here.

Here’s a summary of all the new thinks I found on Windows Azure.

Stopped VM’s will not be charged anymore
This is a great feature for my development and test environment where I always had to remove the VM to stop the charging.
As a bonus Microsoft changed from charging by the hour to charging by the minute!

MSDN Subscription benefits
As a MSDN Subscriber I’m excited about the new improvements. I can now use more resources, have the legal right to use the dev/test server licenses provided by my MSDN subscription and have a nice overview of my credit usage in the portal. (Read the detailed blog post by Scott Guthrie).

SSL Support with Azure Web Sites
If you put your site in Reserved mode you have the ability to upload a SSL certificate for your custom web-site domains. Don’t forget to select the SSL Binding after you upload your certificate… It took me an extra coffee break before I figured out why it didn’t work right away :-)

BizTalk Services
Microsoft announced a new service called BizTalk Services. It is a managed services which provide integration capabilities for the Windows Azure Platform to extend on-premises applications to the cloud. To try the new service you have to sign up via the Preview Features page in the portal.

Watch this episode of Cloud Cover show for more details.

Windows Azure Pack
Windows Azure Pack is the new name (and next version) of “Windows Azure Services for Windows Server” expected later this year.
The Pack will be an installable feature for Windows Server 2012 R2 and will bring some of the features that are currently Azure-only to the server platform.

Watch the video of Scott Guthrie wearing a BLUE shirt(!) talking about the Windows Azure Pack.

Windows Azure Update

Today Microsoft announced a bunch of new updates on Windows Azure. Here’s a sum up of the updates announced today:

Windows Azure Active Directory Reaches General Availability
Windows Azure Active Directory (AD) has reached general availability and is now ready for production use!
Vittorio Bertocci also announced some new features: read his blog.

Backup and Recovery Services
A new service announced today is the ability to enable backup and recovery protection with Windows Server. You can manage your cloud backups from the familiar backup tools in Windows Server and System Center Data Protection Manager to provide a consistent experience configuring, monitoring and recovering backups across local disk and cloud storage. More info can be found here.

Monitoring and Diagnostics Improvements on Azure Web sites
Azure Web sites is still in preview, but got some new monitoring and diagnostic capabilities. This includes the ability to easily turn on/off tracing and store trace + log information in log files that can be easily retrieved via FTP or streamed to developer machines.
Read Scott Hanselman’s Blog for all the details.