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.
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“).
Inside this new project, right click the section “Roles“->”Add“->”Web Role Project in solution” and select your Silverlight Web application project (“SimonSilverlight.Web“).
Done! You can now right click the “Cloud Service” project and publish it using the Windows Azure portal.
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:
All the source code is available for download from the project site on codeplex.