My talk was on Building Connected Windows 8 Metro applications with Windows Azure, and we showed how to use the Camera UI to upload images to Blob Storage, Geolocation to add a point of interest to a SQL Azure database and then add a pin to a Bing Map, and finally add Notification Services to update the Live Tile. It was a lot of code and I promised to share it here, so if you’re looking for the link to download it is http://aka.ms/dfwWin8Az.
Here are some notes to be able to build out & deploy locally and then migrate the services to Azure…
- This project is designed to run locally against the Azure Storage Emulator and SQL Express. It can easily be modified to run as a cloud service, see steps below.
- Do a CTRL+SHIFT+F to search for "TODO" to find all the places where you need to personalize settings
- I've included the script MsdnDB.sql which should be run against a local instance of SQL server, or against a cloud instance.
- You should download the Bing Map VSIX installer to add functionality for Metro. Download the latest from Visual Studio Gallery here
- I used several packages to enable notifications. These included
For MyApp --> PM> Install-Package Windows8.Notifications
For MySite --> PM> Install-Package WindowsAzure.Notifications
PM> Install-Package wnsrecipe
- To deploy to the Cloud
1. Create an Azure Web Site from the Management console, then download the publish settings from the web site dashbaord
2. Create a storage account and update the web.config of MySite with appropriate storage credentials
3. Create a SQL Azure database
4. Run the create script MsdnDB.SQL (included) against database
5. Update credentials in web.config of MySite
6. Change MyApp MainPage.xaml.cs URI's to point to your site instead of localhost:19480
7. Run the NuGet Packages from Package Manager console
8. Register your app for notifications on https://manage.dev.live.com/Build
- update the Package Name reference in Package.appxmanifest
- Add the SID and Client secret to the SendNotification method in LocationController.cs