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.


WAT Windows Phone

This section describes how to create a new Windows Phone 7 Cloud Application using the project template included in this toolkit.  To watch a screencast on how to get started with the toolkit, please visit Getting Started with the Windows Azure Toolkit for Windows Phone 7 on Channel 9.

 

Creating a New Windows Phone 7 Cloud Application

  1. Open Visual Studio 2010 as administrator (this is required to run Windows Azure projects).
  2. In the File menu point to New and then click Project.
  3. In the Installed Templates list on the left of the New Project dialog, select Cloud under the Visual C# node, select the Windows Phone Cloud Application template, enter the Name and Location of the solution, and then click OK.
    image
  4. In the New Windows Phone Cloud Application Project dialog, select which storage options you wish to use. You must select at least one of the Windows Azure Storage or SQL Azure Database options.
    Note: Windows Azure Storage is the project template’s default choice to store the Membership providers’ information and other infrastructure data. In case SQL Azure Database is the only storage choice selected, this information will instead be stored on a SQL Azure database.
    image
  5. Click Next to move to the next step of the wizard.
  6. If the Windows Azure Storage option was selected, you need to provide your Windows Azure Storage account information (name and key). If you instead want to use the Storage Emulator, then check the Use Storage Emulator option.
    image
  7. Click Next to move to the next step of the wizard.
  8. If the SQL Azure Database option was selected, you need to provide your SQL Azure database Server information (server name, user and password).
    image
    In case you want to use a local SQL Server instance instead of a SQL Azure Database, check Use local SQL Server instance, and select which instance of SQL Server you wish to use from the list.
     
  9. Click Next to move to the next step of the wizard.
  10. For the Push Notification Services options, select whether you want to include the Push Notifications Service support for Windows Phone and/or iOS devices (by default, only the Microsoft Push Notification Service support option is checked).
    image
    If the Apple Push Notification Service (APNS) support option is checked, a dialog window appears showing a list of the certificates installed in your local machine. Select the certificate to use as the APNS certificate identity and click OK.
     
    Note: To create and install the Apple Push Notification certificate for a specific iOS application, you first need to register within the iOS Developer Program and get an SSL certificate from the iPhone Provisioning Portal. For more information, you can check the Provisioning and Development article in the iOS Developer Library.
     
    image
     
    image
    Note: The Android Push Notification Service is not currently supported. It will become available in future releases of the toolkit.
      
  11. Click Next to move to the next step of the wizard.
  12. Select the authentication mechanism the application will support. You can choose either ASP.NET membership (default) or Windows Azure Access Control Service.
    image
    Note: For additional help on how to choose the authentication mechanism most suitable for your application, check Choosing the Access Control Strategy.
     
    If the Windows Azure Access Control Service (ACS) option is selected, you need to provide the Namespace and Management key of your ACS service. For instructions on how to obtain your own Windows Azure Access Control Service namespace and management key, see Obtain Namespace and Management Key.
    image
    Note: If ACS authentication is selected, the template will perform the following configuration steps in your ACS namespace:
    1. Add the following identity providers: Windows Live ID, Google and Yahoo.
    2. Add the new application as a Relying Party Application.
    3. Define a default set of claim transformation rules (needed for the application)
       
  13. Click OK and wait until Visual Studio finishes creating the projects.
  14. Explore the solution generated. You should see the following projects:
    1. WPCloudApp1: Windows Azure project with a Web Role configured.
    2. WPCloudApp1.Phone: Silverlight for Windows Phone project containing a sample application that shows how to receive push notifications and consume Windows Azure Tables, Blobs and Queues.
    3. WPCloudApp1.Web: ASP.NET MVC 3 project configured as a Web Role containing the toolkit services and the administration pages.
      Note:
      The project names might be different depending on the name you typed in the New Project dialog.

      image

  15. Additionally, the project template also creates a Libs folder containing the following assemblies:
    1. AspProviders.dll: ASP.NET Providers for Windows Azure Tables (Membership, Roles, Profile and Session State Store).
    2. Microsoft.Samples.Data.Services.Client.dll: 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).
    3. MIcrosoft.Samples.DPE.OAuth.dll (ACS only): Microsoft DPE OAuth2 library.
    4. SL.Phone.Federation.dll (ACS only): Microsoft Silverlight ACS sign in control.
    5. WindowsPhone.Recipes.Push.Messages.dll (Microsoft Push only): Push Notification Server Side Helper Library (http://create.msdn.com/education/catalog/article/pnhelp-wp7).
    6. WindowsPhoneCloud.StorageClient.dll: Windows Azure Storage Client library for Windows Phone.

Note: The number of assemblies might be different depending on the settings configured in the wizard.

 

Next step: Running and Going Through the Windows Phone Cloud Application

Last edited Jan 21, 2013 at 8:24 PM by nharris, version 11

Comments

payini Feb 18, 2012 at 4:35 AM 
Great tutorial. This is good info.