BenkoBlog

Confessions of an Evangelist

CloudTip #17-Build Connected Windows 8 Apps with Windows Azure

imageYesterday in Dallas we had Scott Guthrie (@ScottGu) and the Azure team put on a great event at the Irving Convention Center to show off what’s new in the Microsoft Cloud story and to dive into getting started with the tools and services that make it work. Chris Koenig did a great job of coordinating the event and Adam Hoffman, Clint Edmonson and Brian Prince all pitched in with sessions about Virtual Machines, Web Sites and how to work with the services.

imageMy 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…

image- 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
    http://visualstudiogallery.msdn.microsoft.com/0c341dfb-4584-4738-949c-daf55b82df58

- 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


Enjoy!
-mike

Digg This

Comments (2) -

  • XUcLYU

    7/10/2016 11:47:48 PM |

    333968 476783This website is often a walk-through like the info you wanted in regards to this and didn�t know who to question. Glimpse here, and you�ll certainly discover it. 194625

  • TQwCAYkrfRi0E

    6/4/2017 3:33:27 AM |

    278825 809672As a result you�ll need ultra powerful online enterprise suggestions to keep operating in obtaining into matters correct your incredible web-based work. MLM 49217

Comments are closed