Saturday, February 18, 2012

Getting Started with Windows Azure – Part 3

Now that we have a working application, lets get it deployed to Windows Azure.

Right click on your project and select “Deploy to Windows Azure”. You will then be presented with a dialog to choose your subscription.

GettingStarted11

Click on the “Sign in to download credentials” link. This will open a new browser window where you will sign in to Azure. Once you have done so it will want to download a file that will configure our publishing settings.

Hit the “Import” button and browse to the .publishsettings file that you just downloaded. After a moment, the drop down list should be populated with your subscription name. In our case this is “3-Month Free Trial”. Hitting “Next” presents us with a prompt indicating we have not created any Azure Hosted Services yet.

GettingStarted12

So log back into your Windows Azure account and select “New Hosted Service” at the top of the screen.

GettingStarted13

You’ll be prompted to name your service, denote the URL prefix by which you want to access the application, and choose the region that will be hosting the service. Hopefully you can come up with something unique. Also under “Deployment option”, select “Do not deploy” as we will take care of the later.

GettingStarted14

After a few moments, your new Hosted Service will be created.

While we are here, lets create a new Storage Account. Obviously you’ll want to click on “New Storage Account” at the top of the page. Once again you will be prompted to choose your subscription and give your Storage Account a unique URL name.

GettingStarted15

A few more moments and your storage account should be created.

Now when we try deploying our project again, we see everything filled in and ready to go.

GettingStarted16

Go ahead and select “Publish”. The first time you attempt to deploy your application, it will take a few minutes. In my case, after about 7 minutes I saw A status of “Completed” in my Windows Azure Activity Log pinned to the bottom of Visual Studio 2010.

Now the only thing left is to browse to the “cloudapp.net” URL you designated in your Hosted Service configuration and see your new Windows Azure application in action.