This project is read-only.

This Toolkit is now deprecated and is now

superseded by Windows Azure Mobile Services

During the early previews of Windows 8, the Windows Azure Toolkit for Windows 8 provided developers with the first support for building backend services for Windows Store 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.  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.

Sample Metro App using Windows Azure Service Bus

The Windows Azure Service Bus Sample browser application demonstrates how to send and receive messages from a Windows 8 Metro style application via Windows Azure Service Bus Queues, Topics and Subscriptions.

Windows Azure Service Bus Messaging provides cloud-based, message-oriented-middleware technologies including a full featured Message Queue with support for arbitrary content types, rich message properties, correlation, reliable binary transfer, and grouping. Service Bus Topics provide a set of new publish-and-subscribe capabilities and are based on the same backend infrastructure as Service Bus Queues. A Topic consists of a sequential message store just like a Queue, but allows for many concurrent and durable Subscriptions that can independently yield copies of the published messages to consumers. Each Subscription can define a set of rules with simple expressions that specify which messages from the published sequence are selected into the Subscription.

This sample consists of a sample library that creates an easy to use abstraction on top of the Windows Azure Service Bus REST APIs and a sample to demonstrate the usage of the Windows Azure Service Bus from a Windows 8 metro style using this sample library.

The remainder of this document will walk you through how to run the sample service bus application.  If you would like to learn more about Service Bus and how the sample actually implement this functionality please read Getting Started with the Service Bus Samples for Windows 8 by Will Perry.

Important: Setting up the Windows Azure Service Bus Sample

Before running the application, you must first configure a Service Bus namespace and then configure the sample application to use this namespace. You can do this as follows.

  1. Navigate to the Windows Azure portal. You will be prompted for your Windows Live ID credentials if you are not already signed in.
  2. Click Service Bus, Access Control & Caching link in the left pane, and then select the Service Bus item under the Services element.


  3. Add a Service Namespace. A service namespace provides an application boundary for each application exposed through the Service Bus and is used to construct Service Bus endpoints for the application. To add a service namespace, click the New button on the upper ribbon bar.


  4. On the left list, check all the available services. Enter a name for your service Namespace, select a Region for your service to run in, choose the Subscription and a Cache Size a click Create Namespace. Make sure to validate the availability of the name first. Service names must be globally unique as they are hosted in the cloud and accessible by whomever you decide to grant access.


    Record the Value of your ServiceNamespace as you will later use this to configure the sample application.

  5. Once the namespace is active, click its name in the list of available namespaces to display the Service Namespace information page.


  6. In the Properties right pane, locate the Service Bus section and click the Default Key View button.


    Record the value shown for Default Issuer a Default Key, and click OK. You will need these values later when configuring your Web Role settings.


    Now that you have your Service Namespace, Default Issuer and Default Key you are ready to configure the application.


Running the Windows Azure Service Bus Sample

  1. Open Visual Studio 11.
  2. Open the Microsoft.Samples.ServiceBus.Metro.sln solution located in the Samples\ServiceBus folder.
  3. Open App.xaml.cs, in the Microsoft.Samples.ServiceBus.SampleBrowser project and set the values for the Service Namespace, Default Issuer and Default Key where indicated in the following image.


  4. Make sure that the start-up project of the solution is the Metro style app project. To set the startup Project right-click on the Microsoft.Samples.ServiceBus.SampleBrowser project in Solution Explorer and select Set as StartUp Project.
  5. Press F5 to run the application.


  6. Select one of the three options and follow the steps within the application to learn about using Service Bus from within a Windows 8 metro app. The following options are available:
    1. Simple Queues: Explore the basic functionality of a Service Bus Queue, including Create, Delete, Send and Receive operations. Please notice that Queue names must not contain spaces.


    2. Simple Topics: Explore the basic functionality of a Service Bus Topic including Create, Subscribe, Send and Delete.


    3. Peek Lock: Explore alternate receive semantics you can use when reading messages from Service Bus.


Last edited Jan 21, 2013 at 8:58 PM by nharris, version 16


No comments yet.