Simon in the cloud: deploying your existing Silverlight application to the Windows Azure platform

Windows Azure July 2009 CTP is now available: you can download the Windows Azure Tools for Microsoft Visual Studio from here.

It’s now possible to associate an ASP.NET Web Application project in a Cloud Service solution as a Web Role: in this way it’s pretty simple to deploy a Silverlight Web application to Windows Azure without making any change.

To try this new feature, I’ve deployed the Silverlight version of Simon (I already blogged about this cool project by David J Kelley), you can try it here: http://azuretestapp.cloudapp.net/.

How to achieve this task?

First of all install the Windows Azure Tools for Microsoft Visual Studio July 2009 CTP and then request a token in order to create your Azure application (detailed information are available in this great tutorial).

Then, open your Silverlight solution and add a new “Cloud Service” project (I’ve named it “SimonAzureService“).

SilverlightAzureFig01

Inside this new project, right click the section “Roles“->”Add“->”Web Role Project in solution” and select your Silverlight Web application project (“SimonSilverlight.Web“).

SilverlightAzureFig02

Done! You can now right click the “Cloud Service” project and publish it using the Windows Azure portal.

SilverlightAzureFig03

A quick tip: if your Silverlight plug-in is hosted on a simple html page (Index.html, for example), you have to modify the web.config file and add the following setting in the <system.Webserver> section:

 <defaultDocument>
<files>
<add value=”Index.html”/>
</files>
</defaultDocument>

All the source code is available for download from the project site on codeplex.

Windows Azure for Developers

The new developer portal is on-line: http://dev.windowsazure.com/

Also available the March 2009 CTP of the Windows Azure SDK and Windows Azure Tools for Microsoft Visual Studio. These latest releases are available here: