On the left side of Server Manager expand Storage and select Disk Management,

You need a second hard drive with as much unallocated space on it as the size of the volume you want to mirror.

Right click the volume you want to mirror and select Add Mirror…

Select the disk that will contain the mirror and click the Add Mirror button,

The operating system will create a volume on the mirror disk and will start to copy the contents of the original volume to the mirror. This operation can take hours depending on the size of the mirrored volume.

Call the Azure_Helper from the Console Application

Open the Program.cs file in the Azure_ConsoleApplication

Add the following to the end of the Main method

// Delete the blob from the Azure storage
azureHelper.DeleteBlob(sContainerPath, sBlobName);

When you are testing the application the first time you can place a break point to the line that calls the DeleteBlob method and use the Azure manager at https://manage.windowsazure.com to follow the creation and deletion of the blob in the Azure storage container.

In the second part of the Azure Storage series we have developed a .Net application that can create a Microsoft Azure storage container and upload files into it. Today we will extend the functionality of our application to list the files in the container.

List the files in the container

First let’s create a class that represents the Azure Blob. This way we can isolate our console application from the Azure Storage system, so in the future it can work with any cloud storage systems.

Add a file to the Azure_Helper project to store enumerations

Right click the Azure_Helper project and select Add -> Class…

Name the class Enums

Add an enumeration outside of the class definition. The file should look like this:

Create a Blank Solution

Add a new Console Application project to the solution

In the Solution Explorer right click the solution and select Add -> New Project…

Name the project Azure_ConsoleApplication

Add a Class Library project to the solution

In the Solution Explorer right click the solution and select Add -> New Project…

Name the project Azure_Helper

Set the namespace of the helper project to nsAzure_Helper

When you create a new project Microsoft Visual Studio sets the default namespace to the same as name of the project. In .NET you cannot create a class with the same name as the name space of its project. For clarity I usually name the main class of the project after the name of the project, so I have to change the default namespace of the project.

Right click the Azure_Helper project and select Properties

On the left side select the Application tab

Set the Default namespace to nsAzure_Helper

Press CTRL-S on the keyboard to save the project file

Add a new class to the Azure_Helper class library

In the Solution Explorer delete automatically created the Class1.cs file

Right click the Azure_Helper project and select Add -> Class…

Name the new class Azure_Helper and click the Add button

Add an Application Configuration File to the Console Application to store the Azure connection string

In the Solution Explorer right click the console application and select Add -> New Item…

When the new App.config file opens add lines to it, so it looks like this:

Add an option to make the container public

When you create the container only the account owner can access the files in the container. We will add a boolean argument to the CreateContainer method, so the caller of the method can make the container public. Anyone on the Internet can see the public files, but you need the access key to modify and delete them.

Change the signature of the CreateContainer method in the Azure_Helper class to

Upload a file to the container

The files in the container are called blobs (binary large objects), because those can be any type of files: documents, pictures, videos, music. There are two methods to store these blobs: as blocks or pages. in this example we will store our files a block blobs.

Sign up for Microsoft Azure

To create a Microsoft Azure storage account first create a Microsoft Azure account. If you are an MSDN subscriber you may open an account without using a credit card and limit your usage to the MSDN provided $150 free monthly allowance.

Once you created your Microsoft Azure account open the Azure Management Console at

Create a storage account

If you want to save money for your test environment uncheck Enable Geo-Replication

Click the Create storage account at the bottom

Get the Storage Access Keys

To access your storage area you need to use the 512 bit storage access keys. Azure already generated them:

In the Azure Management Portal select All Items on the top of the left side

Select the storage account you want to administer

At the bottom of the page click Manage Access Keys

Copy the primary and secondary key from the pop-up window

Get a Cloud Storage Management tool

Microsoft did not develop a management tool for its cloud storage solution, so you need to shop around an find a tool you trust. The MSDN web site contains an outdated list of Windows Azure Storage Explorers at

One new tool is Cloud Combine. It has a 30 day free trial period and a $9.99 price with unlimited lifetime usage and updates. You can get it at http://www.gapotchenko.com/cloudcombin This tool can also manage your Amazon S3 storage account.

In the next article we will create a .Net application to access the Azure Storage.