Archive for the ‘Windows Azure’ category

Migrate Azure Service

October 2, 2012

If you are looking to migrate a single azure service to a different account you can find the steps I took here.  First, you might want to consider having Microsoft do it for you.  Take a look at How to transfer your Azure site to another subscription for more information on that.  I wanted to control when things happened on my timetable so I chose a different path mainly so I could coordinate re-pointing my domain.

In my case I have a web application and SQL Database that I will be migrating.

  1. Move your database.
    Microsoft provide a nice feature in the old portal for moving your database.  It actually isn’t a move, it is just changing the owning subscription, so the connection string stays the same, and it only takes two seconds.  R Syam Kumar has a nice post on it on the Windows Azure Blog.  In order to perform the move you will need to have access to both your subscriptions in the Management Portal.  I accomplished this by adding one user as a co-admin on the other subscription.  Then login with the user that has access to both subscriptions.  Note: This all needed to be done in the old azure management portal at the time of writing.
  2. Create Services in the destination subscription such as a Cloud Service or Web Site.
  3. Publish your services to the destination subscription with the same package you have on the other subscription.
  4. Test it to make sure everything is working on the destination using the url.
  5. Point your domain to the destination subscription.
  6. Wait for it to take affect.
  7. Delete the old services after a few days.  Allow time for cached DNS to catch up.

Up until the point that I found the tool to move the database this was going to be a bit more difficult likely including a short amount of downtime.  Kudos to the Azure team for adding that feature.


Azure Deployment Issue after upgrading to Visual Studio 2010 and .NET 4.0

July 27, 2010

If you have recently upgraded your Web Role project from Visual Studio 2008 to Visual Studio 2010 you may end up experiencing a problem getting your Web Role to startup when you deploy it to Windows Azure.

There are a variety of reasons that your Web Role will not startup properly, however, if you are in this upgrade scenario check the bin of your Web Role project for the msshrtmi.dll.  If it exists then you are in luck, because that is likely your issue.  For some reason when you upgrade, this file ends up in your bin and therefore gets deployed to Windows Azure.  However, if you are developing on a x86 version of Windows (vs x64) then the dll that is in your bin will be the x86 version.  Windows Azure is x64 and thus when Azure attempts to startup your Web Role an error such as the following occurs.

Exception message: Could not load file or assembly ‘msshrtmi’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

It took a bit of playing around and comparing of the project files of a brand new Web Role to an upgraded one.

I was told that if I delete all of the bin directories in all of my projects then the file will not get copied.  I personally found this to be false, but it may be something that you will want to try.  After quite a bit of playing around I found that if I remove the <PlatformTarget> element from the configuration property group in the project file of my web project then the msshrtmi.dll file is not copied to the bin.  Hurray!


  1. Open the web site project file using Notepad.
  2. Remove the PlatformTarget element from all configuration property groups.

Example Configuration Property Group
<PropertyGroup Condition=” ‘$(Configuration)|$(Platform)’ == ‘Debug|AnyCPU’ “>

If you still are unable to get your Web Role to start I believe you will need to log a case with “Report Live Site Issues” for Windows Azure from the Windows Azure support page.  I currently do not know how to view the log files that would provide you the startup errors, which is why you will need to log a case.  If anyone knows how to get the startup errors please post a comment or email me.

Azure Tip #1 – Getting Started

December 9, 2009
Technorati Tags:

It is time to get started with developing and deploying applications to the cloud with the Windows Azure Platform.  Azure will be in production in January and free to use until February which means this is the perfect time to start learning since it is basically production ready now but you don’t have to pay for it.  This post is the first in a series of upcoming tips.  I have been playing around with Azure on the side for a few months now and would like to share some of the things that I have and will run into.  To get started, here are a few suggestions on what I would do to get a feel for Azure if I were to do it again.

Sign Up for an Azure Account

  • You will want to get access to both Windows Azure and SQL Azure to start.  You will need a Windows Live id that both of the accounts will get linked to.  The Windows Azure account was setup immediately for me, but I had to wait 2 days to receive my SQL Azure registration token.

Setup Development Environment

  • Get a Machine or VPC with Windows 7 or Windows Server 2008 R2.  I personally started with Server 2008 on a VPC but it was so darn slow.  Instead of dealing with the performance I decided to try out Windows 7 and boot to VHD. Go for Windows 7, it is so fast even when booting to VHD.
  • Choose your IDE.  I chose Visual Studio 2008, however, they say 2010 will work as well.
  • Download & Install Windows Azure Tools for Microsoft Studio
  • Download & Install Windows Azure SDK
  • You could also install the AppFabric, however, it is not necessary and it is something I personally would wait until you are comfortable with Azure.
  • Downloads Page (This link will likely be valid longer than the ones above.)

Watch / Listen

Things to Try it Out

  1. Connect to SQL Azure 
    1. Through SQL Management Studio
    2. Using ADO.NET from your desktop
    3. Using ADO.NET from a deployed Web or Worker Role
  2. Deploy a Web Role
  3. Deploy a Worker Role
  4. Take an existing application and move it to Azure
    1. Create the database schema on SQL Azure
    2. Deploy the web application to Staging

This tip consisted mostly of ideas on things to try and links to resources.  In future tips I will start to go through some of these items individually in more detail.