Deploy Silverlight UI with all supporting files into Window Azure
Normally when you deploy your Silverlight 5.0 project you might have couple of supporting files like DLL’s, Images, .zip etc.
And when you deploy your project into on Premises (Normal Servers) then you normally deploy all your supporting files into deployment servers and your Silverlight application read that files from there with Relative path option.
But the case will be little different when you deploy same Silverlight 5.0 application into Window Azure (Howto create and deploy Silverlight application into Window Azure), all the supporting files/folders you cannot deploy into the Window Azure as same you normally do it in on premises.
There are two options to do the things
- You can utilized Window Azure blob storage to store all your supporting files/folders, Upload all your files into Window Azure Blob and change in your Silverlight code to read that files/folders from blob. You can see couple of links to understand ‘Howto upload/download files into Window Azure Blob’
- Second option if you don’t want to use Blob storage, you can combine into same package (Window Azure Package) and you are good to go, but for doing this you need to do following changes into your Silverlight1.Web Project
- Move all your supporting files/folders from SilverlightUX.proj to Silverlight.Web.proj
- Change your Silverlight code to read files/folders from new path you changed
- Go to the file, right click and open the properties window and set properties as below
- Build Action à Content
- Copy to Output Directory à Do Not copy
- Copy Local à True
Now all Silverlight supporting files will be bind with Window Azure package and no need to do any configuration changes require.
Useful links
- Create and Deploy Windows Azure Application
- Developing and Deploying your First Windows Azure Application
- Hosting and Debugging Silverlight in Windows Azure
- How to Use the Blob Storage Service