Windows Azure Troubleshooting Glossary

One of the hardest things we face as developers is Troubleshooting and Debugging code in different environments and scenarios, this continues to hold true in the Cloud. This Blog post will outline some of the resources available to developers that are trying to troubleshoot Windows Azure.

Developers, Developers, Developers... Code with Microsoft

Troubleshooting the Environment in Windows Azure

Troubleshooting Windows Azure Operating System Issues

Even though the Cloud attempts to limit diversity amongst it’s hardware, the Operating System is something that will always need to be able to adapt new features or emerging security threats.

One thing that Microsoft has done particularly well is keeping Operating System upgrades very Abstract in Windows Azure by releasing a new Virtual Machine (VM) Image (OS Guest) with every set of new upgrades. The VM images are controlled in the Cloud Service Configuration (cscfg) file by setting the osFamily and osVersion attributes.

OS Guest Resources

VM Role Resources

Troubleshooting Windows Azure Deployment

Deployment is the stage of development in which you have the least amount of control. A number of Debugging paradigms are not available unless the Role Initializes and is created successfully. Once the Role is created, you will be able to debug using Remote Desktop Access to Windows Azure (if configured), or Download Intellitrace Diagnostics Information (if enabled).

With the introduction of Start-Up Tasks, many new scenarios that may involve debugging have been introduced. Be sure to test your startup scripts using RDP before trying to deploy your application with the Tasks configured in the Cloud Service Definition (csdef) file.

Deployment Resources

Service Management Resources

Windows Azure Diagnostics Resources

Troubleshooting Windows Azure Platform

This includes both the Tools & SDK as well as support for .NET Libraries & Technologies.

Windows Azure Platform Resources

Windows Azure


Troubleshooting SQL Azure

SQL Azure is a Relational Database System in the Cloud. Microsoft’s Cloud approach to the cloud does not limit support for Popular Programming Languages and therefore was a need for a Management Component for SQL Azure to allow those who are not using the Microsoft Stack a way to manage their SQL Azure database without the need to install SQL Server Management Studio (SSMS).

SQL Azure Database Troubleshooting

When Microsoft started Venturing down the road of Creating SQL Azure they had a number of security concerns to address exposing a full features SQL Server instance in the Cloud. With this in mind, there were a number of features that were pulled out of SQL Azure from your typical install of SQL Server 2008.

Along the same lines of feature support for SQL Azure, there were a number of commands that needed to be cut from T-SQL in the Cloud.

SQL Azure Resources

Transact-SQL (T-SQL) Resources

SQL Azure Manager Troubleshooting

Formerly Project Houston, the Database Manager for SQL Azure is a new service offering (Released at PDC 2010).  An extremely compelling offering being able to manage a database from any computer that has internet connectivity, with one limitation, a dependency on the Silverlight Browser Plugin (which in my opinion *everyone* should have).

Database Manager for SQL Azure Resources


Troubleshooting Windows Azure Security

Security is one of the Major concerns in the Cloud, Hopefully you aren’t using these to troubleshoot someone breaking into your application on Windows Azure, but actually reading them while you’re preparing your architecture plans for your system.

Windows Azure Security Resources

This article also appears on SyntaxC4's Blog.

Essential Resources for Getting Started with Windows Azure

This following blog post was co-authored by John Bristowe and Cory Fowler.


Important! Check out the Windows Azure Introductory Special. It is the easiest way to get started with Windows Azure. To make it even easier, Barry Gervin and Cory Fowler have created some step by step videos on how to register for Windows Azure using the Introductory Special. If you’re a [Premium, Ultimate, or BizSpark] MSDN Subscriber, you are eligible to participate in a Windows Azure Benefits which includes free consumption of Windows Azure Services.

Essential Downloads

Folks in the Know


Blogs and Websites

Essential Reading



Essential Listening

Projects, Third Party Tools and Other Downloads

Essential Code/Scripts/Virtual Labs

This article also appears on Canadian Developer Connections.

Connecting to an Azure Instance via RPD

This post is a conclusion to a series of blog entries on how to RPD into a Windows Azure instance. If you haven’t already done so, you may want to read the previous posts:

This post will provide two pieces of information: first, now that your Windows Azure Platform Portal has been configured for RPD, I will show you how to initialize the RDP Connection to a Windows Azure Instance. Second, I’ll step back and explain how to Setup the Cloud Service Configuration manually (which is typically automated by Visual Studio).

Connecting to Windows Azure via RDP

At this point you should have already uploaded a Certificate to the Hosted Service, checked the Enable checkbox in the Remote Access section of the Portal Ribbon and configured a Username and Password for accessing the particular Hosted Service.

In the Hosted Service Configuration page, select the Instance you would like to connect to.

Select Windows Azure Role Instance for RDP

This will enable the Connect button within the Remote Access section of the Portal Ribbon. Click on the Connect button to initialize a download of the RPD (.rpd) file to connect to that particular instance.

Windows Azure Platform Portal Remove Access Settings

You can obviously choose open, however this is a good opportunity to save the RDP connection to an instance just for that odd chance you can’t access the Windows Azure Platform Portal to download it again. I would suggest saving at least one RDP file in a save location for this very reason.

 Save RPD File for Future Use

You may need to accept a Security warning because the RDP file is Unsigned.

Unknown Publisher Warning

Then supply your username and password which was set up in the previous set of posts.

Entering your Credentials to the Windows Azure

Initializing Connection to Windows Azure

Once the connection has been initialized there is one last security warning to dismiss before the desktop of your Windows Azure Instance appears.

Indentify Connection to the Cloud

Welcome to your Windows Azure Instance in the Cloud!

Windows Azure Instance Desktop

Manually Configuring RDP Access to Windows Azure

In order to manually configure RDP access to a Windows Azure Instance in the csconfig file there are a few things that need to be done. There is a well written outline on MSDN in a post entitled “Setting up a Remote Desktop Connection for a Role”.

During Step 2 of the process outlined on MSDN, Encrypting the Password with Powershell, there is the need to provide a thumbprint for a Self-Signed Certificate. What isn’t mentioned within the article is that it is necessary to Capitalize the Letters and Remove the Spaces in the thumbprint in order for the Powershell script to work.

Happy Clouding!

This post also appears on SyntaxC4's Blog.

Post #AzureFest Follow-up Videos: Part 2

In our last set of Videos [Post #AzureFest Follow-up Videos] Barry and I talked about how to Register for a Windows Azure Account, Setting up a Hosted Service, Deploying your first Azure Application, and tearing down the Application.

In this set of videos Barry and I walk-thru setting up a SQL Azure Database using the Windows Azure Platform Portal, as well as Generating Script files for the existing NerdDinner Application for Deployment into the Cloud.

Setting Up a SQL in the Cloud using SQL Azure

As explained at AzureFest, there are very few steps required to set up a Database on SQL Azure. The main thing to watch for in this video is the Firewall settings, this is important to keeping your data secure in the cloud. If you set up Firewall rules for Cafe’s or Restaurants, be sure to remove the IP Address Range from the Firewall before you exit the establishment.

Setting up a SQL Azure Instance for Cloud Based NerdDinner Deployment


Generating Scripts against On-Premise Database to Deploy to SQL Azure

In this Video, Barry and I explain how to script the existing on premise databases from the NerdDinner Application and run those scripts against our newly created SQL Azure Database. We also venture into the new SQL Azure Database Manager [Built on Windows Azure with Silverlight].

Scripting Database Tables and Running Script against SQL Azure


Next Steps…

Look for some additional content coming in the New Year! Barry and I will be covering Setting up your environment, and deploying the full NerdDinner Application to the Cloud!

This post also appears on SyntaxC4's Blog.

Setting up RDP to a Windows Azure Instance: Part 2

In my last post, Setting up RDP to a Windows Azure Instance: Part 1, I explained how to setup Remote Desktop into the Cloud using Visual Studio 2010.

However, the cloud isn’t for Developers alone, we have to think of our IT Pro counterparts. This post will explain how to setup and configure RDP access to the Cloud without using Developer Tools.

Creating a Self-Signed Certificate with IIS7(.5)

1. Open IIS, Double-Click on Server Certificates.


2. In the Actions menu on the right, Select “Create Self-Signed Certificate…”.


3. Specify a Friendly Name for the Certificate.


4. Ensure the new Certificate has been created.


Using the Windows Azure Service Management API

So I said I was going to use the Service Management API and I am, however I am going to cheat a little bit by using the Windows Azure Service Management CmdLets [which is a convenient PowerShell Snap-in created by Ryan Dunn (@dunnry)].

Upload-Windows-Azure-Management-Certificate-For-APIBefore we can interact with the Service Management API we must upload a Management Certificate [which is similar to he process outlined in my previous post on Exporting and Uploading a Certificate to Windows Azure]. The Management Certificates are uploaded from within the Windows Azure Platform Portal as seen in this picture to the right.

Management Certificates are used by Visual Studio to interact with the Windows Azure Platform. The Management Certificate paired with the Subscription ID are used to Authenticate Access to the Windows Azure APIs.

Now that we’ve covered the Management Certificates, lets fire up the Windows PowerShell ISE.

Using the Windows Azure Service Management CmdLets

If you haven’t already done so download the Windows Azure Service Management CmdLets.

First you will have to tell PowerShell you would like to use the snap-in, use the following snippet of code to add the Azure Management Tools Snap-in.

Add-PSSnapin AzureManagementToolsSnapIn

If you’d like to list all the Commands that are included in the Windows Azure Management Snap-in simply execute this line of code:

Get-Command -PSSnapIn AzureManagementToolsSnapIn

We’re going to be using the Add-Certificate command to add a Certificate to our Hosted Service. First lets take a look at some of the examples of how to use this command by executing:

Get-Help Add-Certificate

As you can see there are a few options for running the Add-Certificate Command, I’ve chosen this format:

Add-Certificate -ServiceName RDP2Azure 
-CertificateToDeploy (gi <path-to-cert>\azurefest-RDP.cer) 
-Subscription ID ********-****-****-****-************ 
-Certificate (gi cert:\CurrentUser\My\<thumbprint>)

There are two “Certificate” Arguments which can be confusing especially when they accept different values. CertificateToDeploy is the newly created Certificate which will be used to encrypt the password for our RDP Connection, this argument accepts a file as a parameter. The Certificate argument is the Management Certificate that is being leveraged to Authenticate the transaction. When you run the Script the result should look like this:


You’ll also notice that the Certificate has been uploaded to the Windows Azure Platform Portal.


Configuring RDP in the Windows Azure Platform Portal

Now that we’ve created the Certificate needed to encrypt the RDP password, and we’ve used the Azure Service Management API to upload the Certificate to our hosted Service. Now it’s time to configure our RDP Connection in the Windows Azure Platform Portal.

RDP-To-Azure-ConfigureTo Configure our RDP Access, Select the Role you wish to configure the RDP access for. Then in the Ribbon check off the Enable checkbox, then click on the Configure Button in the Remote Access Group.


Set your username and password for the RDP Connection. Select the Certificate you wish to use to encrypt the password, then select an expiration date for the connection.

Once you’ve finished these steps you will be able to select an instance and Connect to the Cloud.

**Note: I’ll be creating one last entry to review the process of opening up the RDP File to gain access to an Instance running on Windows Azure.






This post was considered the IT Pro explanation for how to grant access to RDP in the Cloud. These skills are transferrable to Development as well if you don’t have Visual Studio.  I will create one final post which explains how to manually create the XML nodes that Visual Studio creates in the Cloud Service Configuration file auto-magically using it’s UI. This manual creation is intended for Open Source Developers or Developers that like to understand how the underlying pieces of the Visual Studio Tools Operate.

This post also appears on SyntaxC4's Blog.

Setting up RDP to a Windows Azure Instance: Part 1

In my previous post, Export & Upload a Certificate to an Azure Hosted Service, I outlined some of the common tasks which are necessary to RDP into a Windows Azure Hosted Instance. In this post I will outline how to use the tools in Visual Studio to setup the RDP Configuration values.

Part 2 of this Series will outline how to Configure the RDP Manually, using IIS, Powershell and the Service Management API. One final post will outline how to get the RPD Connection launched.

Using Visual Studio to RDP to an Azure Instance

If you’re a Developer, this is most likely the simplest process for you. The following steps explain the process of setting up RDP to the Cloud, so a number of Development Processes, including building out your Website are *not* covered.

Visual Studio 2010 Cloud Service Project

1. Welcome to the Start Screen.


2. Create a New Cloud Service Project.


3. Select the Required Projects for the Solution.


Publish the Application to Windows Azure

1. [Time Lapsed: Build Application] Right-Click on Cloud Service Project and select Publish.


2. Choose your Hosted Service and Storage Account to Deploy to.


3. Configure Remote Desktop connections.


4. Create a Certification (this is used to encrypt the credentials).


5. Create a Username and Password for the RPD Connection.


6. Export and Upload the Certificate to the Hosted Service.


7. Press OK on both the Remote Desktop Setup and Publish Dialog boxes. This will begin the Publish Process.


Next Steps

This concludes the configuration of RDP into a Windows Azure Instance using Visual Studio 2010. The next step would be to connect to the Windows Azure instance. I will be posting another entry to cover the steps to connect, however it will be after I complete my next entry on how to Manually Configure the RDP Connection.

This post also appears on SyntaxC4's Blog.

Export &amp; Upload a Certificate to an Azure Hosted Service

Last night I started doing some research into the new features of the Windows Azure SDK 1.3 for a future blog series which I’ve been thinking about lately. The first step was to figure out what was installed on the default Windows Azure image, in order to determine what would need to be installed for my Proof of Concept.

There are two ways to set up the RDP connection into an Azure instance: a developer centric approach, which is configured in Visual Studio, and an IT centric approach which is configured through the [new] Windows Azure Platform Portal. I had thought it might be cool if this functionality was available using the Service Management API, however this is not publicly exposed [which probably is a good thing].

To minimize content repetition I decided to split the export and upload process to this blog post.

Exporting a Certificate

1. Open the Certificate (From Visual Studio Dialog, IIS or Certificate Snap-in in MMC)


2. Navigate to the Details Tab. Click on Copy to File…


3. Start the Export Process.


4. Select “Yes, export the private key”.


5. Click Next.


6. Provide a password to protect the private key.


7. Browse to a path to save the .pfx file.


8. Save the file.


9. Finish the Wizard.



Setting up a Windows Azure Hosted Service

If you’d like to see a more detailed explanation of this, I released some videos with Barry Gervin in my last entry, “Post #AzureFest Follow-up Videos”.

1. Create New Hosted Service.


2. Fill out the Creation Form.


Setting up a Windows Azure Storage Service

The Visual Studio Tools will not allow you to deploy a project without setting up a Storage Service.

1. Create a New Storage Service.


2. Fill out the Creation Form.


Upload the Certificate

1. Select the Certificates folder under the Hosted Service to RDP into. Click Add Certificate.


2. Browse to the Certificate (saved in last section).


3. Enter the Password for the Certificate.


4. Ensure the Certificate is Uploaded.


Moving Forward

This entry overviewed some of the common setup steps between Setting up RDP using Visual Studio, and Manual Configuration. In the Manual Configuration post I will overview how to use the Service Management API to install the Certificate to the server (instead of the Portal as described above).

Happy Clouding!

This post also appears on SyntaxC4's Blog.

Migrating Large Databases from On-Premise to SQL Azure

altRecently, I was working on a project that required a site migration from a Shared Hosting server to Windows Azure. This application has been up and running for sometime and had acquired quite a substantially sized database.

During the course of the project I ran across a few road blocks which I wasn’t expecting, due to the experience gained in my previous blog entries: Migrate a database using the SQL Azure Data Sync Tool and Scripting a database for SQL Azure (Issues explained in previous link resolved with launch of SQL Server 2008 R2). Hopefully the following tricks will help you along your data migration.

Using Import/Export in SSMS to Migrate to SQL Azure

In addition to the SQL Azure Data Sync Tool, it is possible to use the existing Import/Export Wizard in SQL Server Management Studio to migrate data to SQL Azure. There are a number of things to keep in mind while using the Import/Export Tool:

SQL Server Native Client to .NET Data Provider for SqlServer

SQL Azure doesn’t fall under the typical SQL Server Native Client 10.0 Product SKU, this means that you’ll have to use the .NET Data Provider to migrate your data. The configuration screen for the provider is very intuitive, but there are two key settings that should be changed from their default values, Asynchronous Processing (set to true) and Connection Timeout (increase to 1500).


Without changing the Timeout value the data migration would error out after creating the fist few sets of rows. Making this an Asynchronous process was beneficial when exporting multiple tables at a time.

Work-around for SSIS Type: (Type unknown …) Error

There is a chance when you go to run the migration that you will encounter an error as described in Wayne Berry’s [@WayneBerry] blog post entitled “SSIS Error to SQL Azure with varbinary(max)” on the SQL Azure Blog.

As Wayne explains in his post, there are a number of XML files which contain data mapping information used by the Import/Export Wizard in order to map the data from the source database to the proper data type in the destination database.

Database Seeded Identity Insert Issue

I’m not sure why this happened, but when using the Import/Export even with Identity Insert on, the ID [Identity] Column was not Inserting the correct values. To get around this I used the ROW_NUMBER to generate new Identities and rebuilt the foreign key tables.

There is a lot of chatter on the Forums and other blog posts that say that BCP with the –E switch is the most effective way to do exact copying (with Identity Columns).

For more information:

Cost Effective Approach

A good thing to keep in mind while preparing your database for migration is that transactions as well as data transfer costs are applied to Queries to (and from) SQL Azure. With this in mind it would be best to set up a scenario where you would test your data migration to ensure the data migration would be performed in the least number of attempts as possible.

Happy Clouding!

This post also appears on SyntaxC4's Blog