This Toolkit is now deprecated and is now

superseded by Windows Azure Mobile Services

The Windows Azure Toolkit for Windows Phone provided developers with the first iteration of support for building backend services for Windows Phone apps using Windows Azure.  The main areas of feedback we received from mobile developers was that they wanted a turn-key set of services for common functionality such as notifications, auth, and data.   Windows Azure Mobile Services directly reflects this feedback by enabling developers to simply provision, configure, and consume scalable backend services. The downloads for this toolkit will be removed on the week of Feb 1st 2013 and all future improvements will be channeled into Windows Azure Mobile Services rather than this toolkit. 

To get started with Mobile Services, sign up for a Windows Azure account and receive 10 free Mobile Services.


Windows Phone Cloud Application Project Templates

This toolkit contains the following two project templates for both C# and Visual Basic:

  • Windows Phone Cloud Application: This template makes it easier for developers to create a Windows Phone application that relies on Windows Azure. This template generates a Windows Azure project, an ASP.NET MVC 3 project (configured as a Web Role), and a Windows Phone application project. All these projects working together show how you can interact with Windows Azure Storage without needing to include the storage account information (name and key) in the phone application, thus making it more secure to distribute.
  • Windows Phone Empty Cloud Application: The same as the Windows Phone Cloud Application template, but instead of creating a sample Windows Phone application to highlight the toolkit services, it creates a default Windows Phone application project with minimum settings and dependencies.

Note: Take into account that the content of each of the previous project templates varies according to the Visual Studio edition for which it is targeted.

 

Visual Studio Supported Versions

The toolkit relies on the Windows Azure, Silverlight for Windows Phone and ASP.NET MVC 3 project types. Therefore, to run the sample solution and use the project templates, you will need to have either Visual Studio 2010 Professional (or higher) installed, or both Microsoft Visual Web Developer 2010 Express and Microsoft Visual Studio 2010 Express for Windows Phone.

Project Type

Visual Studio 2010 Professional (or higher)

Visual Studio 2010 Express for Windows Phone

Web Developer 2010 Express

Windows Azure

Supported

Not Supported

Supported

Silverlight for Windows Phone

Supported

Supported

Not Supported

ASP.NET MVC 3

Supported

Not Supported

Supported

Note: For more details about the project types supported in Visual Studio Express editions, check the following table: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/product-comparison#expressCompareTable.

 

If you are running the toolkit with the Visual Studio Express editions (Visual Web Developer 2010 Express and Visual Studio 2010 Express for Windows Phone), one project template will be installed for each of them. The template for Visual Web Developer 2010 Express creates a Windows Azure project and its corresponding ASP.NET MVC 3 Web Role that provides services to work with data in the Windows Azure Storage. On the other hand, the project template for Visual Studio 2010 Express for Windows Phone creates a Windows Phone sample client application that consumes those services and lets users interact with Windows Azure Storage data.

Samples and Libraries Source Code

If you browse to the Samples\WP7.1 folder, you will find the following folders:

  • BabelCam: The source code for the BabelCam sample.
  • TweetYourBlobs: The source code for the Tweet Your Blobs sample.
  • ProjectTemplates: The source code for the Project Templates samples.
  • Libraries: The source code for the libraries included in the toolkit.

Note: You can find in the Samples\WP7.0 folder the source code of the legacy samples and libraries targeting Windows Phone OS 7.0. The source code in them is updated up to the v1.3.0 toolkit release (August 30th, 2011). This means that none of the new features, bug fixes, updates, and changes made to the toolkit afterwards are available in these samples.

 

BabelCam Sample

The BabelCam sample application is based on a similar solution structure as the Windows Phone Cloud Application project templates.

The application allows users to take a picture of a text, upload it to a Windows Azure Blob and send a message to a Windows Azure Worker role using a Windows Azure Queue.

The Worker role, in turn, invokes Microsoft Research Project Hawaii OCR in the Cloud Service to recognize the text, and then, translates it to another language of the user’s choice by using the Bing Translator Service. Finally, it sends a push notification message of the resulting text back to the phone.

If you browse to the Samples\WP7.1\BabelCam folder, you will find three different solution files:

  • BabelCam.sln: This solution only works with Visual Studio 2010 Professional (or higher) and contains all the projects.
  • BabelCam.Phone.sln: This solution works with Visual Studio 2010 Express for Windows Phone and only contains the phone projects:
    • BabelCam.Phone
    • Microsoft.Samples.Data.Services.Client
    • SL.Phone.Federation
    • WindowsPhoneCloud.StorageClient
  • BabelCam.Azure.sln: This solution works with Visual Web Developer 2010 Express and only contains the Azure and Web projects:
    • AspProviders
    • BabelCam
    • BabelCam.Infrastructure
    • BabelCam.Web
    • BabelCam.Worker
    • DPE.OAuth
    • Hawaii.Services.Client
    • Hawaii.Services.Client.Ocr
    • WindowsPhone.Recipes.Push.Messages

Note: The BabelCam.Azure.sln and BabelCam.Phone.sln allow you to run the whole sample without needing to install Visual Studio 2010 Professional (or higher). To do this, you can run both solutions separately, first the Azure solution (as administrator) and then the Phone one. 


Important: Set up BabelCam Sample

Before running the BabelCam sample, you will need to update your Windows Azure Access Control Service Namespace information, your Microsoft Research Project Hawaii Cloud Services Application Id, and your Bing Translator Service Application Id in the configuration files. To do this, perform the following steps:

  1. Double-click the SetupSample.cmd file located inside the Samples\WP7.1\BabelCam folder to launch a tool that will help you in the process of configuring the sample.
  2. In order to use Microsoft Research Project Hawaii services, you must accept their EULA. Review the document and enter y to continue.
  3. Obtain your ACS namespace and its management key. To do this, you can follow the instructions in How to Obtain Namespace and Management Keys?
  4. If you have not created an ACS namespace, you can try out the sample without creating one. Just press ENTER when asked for your ACS namespace and service key and the sample will use the fully pre-configured sample https://watwindowsphone.accesscontrol.windows.net/ ACS namespace.
  5. Enter your Windows Azure Access Control service namespace and the symmetric key you obtained in the first step.
    image
  6. If you want to configure Facebook as Identity Provider, enter your Facebook Application ID and Application Secret. Otherwise, press ENTER.
    image
  7. Wait until the tool finishes configuring your sample.
    image
    Note:
    You can get more information about configuring relying party applications in the ACS Management Portal on the following article: http://msdn.microsoft.com/en-us/library/gg185906.aspx.
     
  8. Obtain your Bing Translator Application Id. To do this, you can follow the instructions in Obtain a Bing Application Id.
  9. Enter your Bing Translator Application Id and press ENTER.
    image
  10. Obtain your Microsoft Research Project Hawaii OCR in the Cloud Service Application Id. To do this, you can follow the instructions in Obtain Project Hawaii Application ID.
  11. Enter your Microsoft Research Project Hawaii OCR in the Cloud Service Application Id and press ENTER.
    image

 

Tweet Your Blobs Sample

 The TweetYourBlobs sample application is based on a similar solution structure as the Windows Phone Cloud Application project templates, but it has being simplified for its particular scenario. Additionally, all the authentication / authorization code was removed to allow anonymous access.

The application allows users to take a picture, upload it to a Windows Azure Blob of their choice and tweet the picture URL.

If you browse to the Samples\WP7.1\TweetYourBlobs folder, you will find three different solution files:

  • TweetYourBlobs.sln: This solution only works with Visual Studio 2010 Professional (or higher) and contains all the projects.
  • TweetYourBlobs.Phone.sln: This solution works with Visual Studio 2010 Express for Windows Phone and only contains the phone projects:
    • TweetYourBlobs.Phone
    • Microsoft.Samples.Data.Services.Client
    • WindowsPhoneCloud.StorageClient
  • TweetYourBlobs.Azure.sln: This solution works with Visual Web Developer 2010 Express and only contains the Azure and Web projects:
    • TweetYourBlobs
    • TweetYourBlobs.Web

Note: The TweetYourBlobs.Azure.sln and TweetYourBlobs.Phone.sln allow you to run the whole sample without needing to install Visual Studio 2010 Professional (or higher). To do this, you can run both solutions separately, first the Azure solution (as administrator) and then the Phone one. 

 

Important: Tweet Your Blobs Sample

Before running the Tweet Your Blobs sample, you will need to update your bitly login and API Key used to shorten picture URLs before tweeting them. To do this, perform the following steps:

  1. Double-click the SetupSample.cmd file located inside the Samples\WP7.1\TweetYourBlobs folder to launch a script that will help you in the process of configuring the sample.
  2. Obtain your bitly login and API Key. To do this, you can follow the instructions in Appendix V: How to obtain a bitly Username and API Key.
  3. Enter your bitly Username and press ENTER.
  4. Enter your bitly API Key and press ENTER.
    image

 

CRUD Sql Azure Sample

The CRUDSqlAzure sample application is based on a similar solution structure as the Windows Phone Cloud Application project templates, but it has being simplified for its particular scenario.

The application shows how to use an OData service on top of a SQL Azure database with full support for CRUD operations, using Windows Azure Access Control Service (ACS) as the authentication mechanism, and storing all the infrastructure information in a SQL Azure database.

If you browse to the Samples\WP7.1\TweetYourBlobs folder, you will find three different solution files:

  • CRUDSqlAzure.sln: This solution only works with Visual Studio 2010 Professional (or higher) and contains all the projects.
  • CRUDSqlAzure.Phone.sln: This solution works with Visual Studio 2010 Express for Windows Phone and only contains the phone projects:
    • CRUDSqlAzure.Phone
    • SL.Phone.Federation
    • Microsoft.Samples.Data.Services.Client
    • WindowsPhoneCloud.StorageClient
  • CRUDSqlAzure.Azure.sln: This solution works with Visual Web Developer 2010 Express and only contains the Azure and Web projects:
    • CRUDSqlAzure
    • CRUDSqlAzure.Web
    • DPE.OAuth

Note: The CRUDSqlAzure.Azure.sln and CRUDSqlAzure.Phone.sln allow you to run the whole sample without needing to install Visual Studio 2010 Professional (or higher). To do this, you can run both solutions separately, first the Azure solution (as administrator) and then the Phone one. 

 

Important: Set up CRUD Sql Azure Sample

Before running the project template samples, you will need to update either your SQL Azure Database and your Windows Azure Access Control Service Namespace information in the configuration files. To do this, perform the following steps:

  1. Double-click the SetupSample.cmd file located inside the Samples\WP7.1\CRUDSqlAzure folder to launch a script that will help you in the process of configuring the sample.
  2. Obtain your ACS namespace and its management key. To do this, you can follow the instructions in How to Obtain Namespace and Management Keys?
  3. If you have not created an ACS namespace, you can try out the sample without creating one. Just press ENTER when asked for your ACS namespace and service key and the sample will use the fully pre-configured sample https://watwindowsphone.accesscontrol.windows.net/ ACS namespace.
  4. Enter your Windows Azure Access Control service namespace and the symmetric key you obtained in the previous step.
    image
  5. If you want to configure Facebook as Identity Provider, enter your Facebook Application ID and Application Secret. Otherwise, press ENTER.
    image
  6. Wait until the tool finishes configuring your sample.
    image
    Note:
    You can get more information about configuring relying party applications in the ACS Management Portal on the following article: http://msdn.microsoft.com/en-us/library/gg185906.aspx.
     
  7. Obtain your SQL Azure server name, username and password. To do this, you can follow the instructions in How to Create a SQL Azure Database Server.
  8. To use a local SQL Server Database, choose 1, enter your SQL Server instance name and the name for the database you wish to use:
    image
    Note: If you use the name of an existing database, it will be dropped and recreated with the schema needed for this sample. Do not use a database that already exists if you need the data in that database.
     
  9. To use a SQL Azure database, choose 2 and enter your SQL Azure server name, username, password and the name for the database you wish to use:
    image
    Note: If you use the name of an existing database, it will be dropped and recreated with the schema needed for this sample. Do not use a database that already exists if you need the data in that database.

 

Project Templates Samples

The toolkit also includes a set of sample applications based on the same solution structure as the Windows Phone Cloud Application project templates. You can find them at Samples\WP7.1\ProjectTemplates.

If you browse to the Samples\WP7.1\ProjectTemplates folder, you will find the following folders:

  • WPCloud.ACS: This folder contains a full version of the sample application showing how to use Blobs, Queues, Tables, Push Notification, and an OData service on top of a SQL Azure database, using Windows Azure Access Control Service (ACS) as the authentication mechanism.
  • WPCloud.Mem: This folder contains a full version of the sample application showing how to use Blobs, Queues, Tables, Push Notification, and an OData service on top of a SQL Azure database, using ASP.NET Membership as the authentication mechanism.
  • WPCloud.SQL.ACS: This folder contains a reduced version of the sample application showing how to use an OData service on top of a SQL Azure database, using Windows Azure Access Control Service (ACS) as the authentication mechanism, and storing all the infrastructure information in a SQL Azure database.
  • WPCloud.SQL.Mem: This folder contains a reduced version of the sample application showing how to use an OData service on top of a SQL Azure database, using ASP.NET Membership as the authentication mechanism, and storing all the infrastructure information in a SQL Azure database.

Each of these samples contains three different solution files (the solution file name matches the Sample project chosen):

  • WindowsPhoneCloud.{Authentication}(.SQL).sln: This solution only works with Visual Studio 2010 Professional (or higher) and contains all the projects.
  • WindowsPhoneCloud.{Authentication}(.SQL).Phone.sln: This solution works with Visual Studio 2010 Express for Windows Phone and only contains the phone projects:
    • Microsoft.Samples.Data.Services.Client
    • SL.Phone.Federation (for ACS only)
    • WindowsPhoneCloud.StorageClient
    • WindowsPhoneCloud.Phone
  • WindowsPhoneCloud.{Authentication}(.SQL).Azure.sln: This solution works with Visual Web Developer 2010 Express and only contains the Azure and Web projects:
    • AspProviders (for full samples only)
    • DPE.OAuth (for ACS only)
    • WindowsPhone.Recipes.Push.Messages
    • WindowsPhoneCloud
    • WindowsPhoneCloud.Web

Note: The WindowsPhoneCloud.Azure.sln and WindowsPhoneCloud.Phone.sln allow you to run the whole sample without needing to install Visual Studio 2010 Professional (or higher). To do this, you can run both solutions separately, first the Azure solution (as administrator) and then the Phone one.

 

Import: Set up Project Templates Samples

Before running the project template samples, you will need to update either your SQL Azure Database or your Windows Azure Access Control Service Namespace information in the configuration files. To do this, perform the following steps:

  1. Double-click the SetupSample.cmd file located inside the Samples\WP7.1\ProjectTemplates\{SampleName} folder to launch a tool that will help you in the process of configuring the sample.
  2. If you are using WPCloud.ACS or WPCloud.SQL.ACS samples, see the next step. Otherwise, skip to step 7.
  3. Obtain your ACS namespace and its management key. To do this, you can follow the instructions in How to Obtain Namespace and Management Keys?
  4. If you have not created an ACS namespace, you can try out the sample without creating one. Just press ENTER when asked for your ACS namespace and service key and the sample will use the fully pre-configured sample https://watwindowsphone.accesscontrol.windows.net/ ACS namespace.
  5. Enter your Windows Azure Access Control service namespace and the symmetric key you obtained in the first step.
    image
  6. If you want to configure Facebook as Identity Provider, enter your Facebook Application ID and Application Secret. Otherwise, press ENTER.
    image
  7. Wait until the tool finishes configuring your sample.
    image
    Note:
    You can get more information about configuring relying party applications in the ACS Management Portal on the following article: http://msdn.microsoft.com/en-us/library/gg185906.aspx.
     
  8. Obtain your SQL Azure server name, username and password. To do this, you can follow the instructions in How to Create a SQL Azure Database Server.
  9. To use a local SQL Server Database, choose 1 and enter your SQL Server instance name:
    image
  10. To use a SQL Azure Database, choose 2 and enter your SQL Azure Server name, username and password:
    image

 

Libraries

Inside the Samples\WP7.1\Libraries folder you will also find the source code of all the libraries included in this toolkit:

  • AspProviders: ASP.NET Providers for Windows Azure Tables (Membership, Roles, Profile and Session State Store)
  • DPE.OAuth: Microsoft DPE OAuth2 library.
  • SL.Phone.Federation: Microsoft Silverlight ACS sign in control.
  • Microsoft.Samples.Data.Services.Client: Modified version of the OData client library for Windows Phone (System.Data.Services.Client) to make it work with the Windows Azure Table Service API – (http://odata.codeplex.com).
  • WindowsPhone.Recipes.Push.Messages: Push Notification Server Side Helper Library, a part of the Windows Phone Push Recipe, that provides an easy way to send all three types of push notification messages that are currently supported by Microsoft Push Notification Services (MPNS): Tile, Toast, and Raw.
  • WindowsPhoneCloud.StorageClient: Windows Azure Storage Client library for Windows Phone.
  • Hawaii.Services.Client.Ocr: Is a version of the Microsoft Research Hawaii Project OCR in the Cloud service client libraries ported to .NET Framework 4.0, that allow simple access to the OCR service from a .NET client. Additionally, all previous asynchronous calls to the Web service have been changed to synchronous versions. 

 

Next step: Architecture Diagrams

Last edited Jan 21, 2013 at 8:23 PM by nharris, version 32

Comments

No comments yet.