Question

I have found this excellent tutorial on this topic, yet it leaves some open questions http://www.silverlightshow.net/items/Silverlight-in-the-Azure-cloud-Part-1.aspx

When creating a new Azure Cloud project with empty roles:

  1. Is it better to add the existing Silverlight Web Project as a Webrole as its suggested in the blog?

  2. Or is it better to create a new WebRole and connect that with the Silverlight Client instead?

The reason I am asking, is that I need to make use of the override OnStart() method within my WebRole to execute a piece of task after the role went up and running. The required class WebRole.cs obviously exists only in the step 2.

Was it helpful?

Solution

If you need to you can simply copy in or create a new WebRole class; it's just a class that inherits RoleEntryPoint. The Windows Azure runtime will always reflect across your deployed role looking fior a class that inherits RoleEntryPoint; this is the same for both web and worker roles.

I tend to advise customers to keep their Silverlight project as a seperate project and to deploy the *.xap file via Blob storage rather than out of the web role. It is, at the end of the day, just another statis resource and the Blob storage approach has the benefits of a) Not chewing clock cycles serving a static file and b) easier to light up to use the CDN whic will make end user expereince a bit nicer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top