Over a million developers have joined DZone.

Windows Azure Mobile Services Preview Walkthrough–Part 5: Distributing Your App From the Windows Store

· Cloud Zone

Download the Essential Cloud Buyer’s Guide to learn important factors to consider before selecting a provider as well as buying criteria to help you make the best decision for your infrastructure needs, brought to you in partnership with Internap.

As noted at the end of the Windows Azure Mobile Services Preview Walkthrough–Part 4: Customizing the Windows Store App’s UI post:

imageI was surprised to discover that packaging and submitting the app to the Windows Store broke the user authentication feature described in the Windows Azure Mobile Services Preview Walkthrough–Part 2: Authenticating Windows 8 App Users (C#) post, which causes the landing page to appear briefly and then disappear.

The problem is related to conflicts between registration of the app with the Live Connect Developer Center as described in Section 1 of my Windows Azure Mobile Services Preview Walkthrough–Part 2: Authenticating Windows 8 App Users (C#) and later association and registration with the Windows Store as noted in the two sections below.

The Live Connect Developer Center’s My Applications page contains two entries for the OakLeaf ToDo app as emphasized below:

LiveConnDevCtr-MyApps List

The other entries in the preceding list are Windows Azure cloud projects and storage accounts created during the past 1.5 years with my MSDN Benefit subscription.

Clicking the oakleaf_todo item opens the original app settings form with the Client Secret, Package Name, and Package Security Identifier (SID) as that shown in Step 1-3 of Windows Azure Mobile Services Preview Walkthrough–Part 2: Authenticating Windows 8 App Users (C#):


The Redirect Domain points to the Mobile Services back end created in steps 7 through 13 of Windows Azure Mobile Services Preview Walkthrough–Part 1: Windows 8 ToDo Demo Application (C#).

The OakLeaf ToDo app settings show a different Client Secret and empty Redirect Domain:

OakLeaf ToDoAppSettings

Clicking the Edit Settings link and clicking the API Settings tab opens this form with the above client secret, an empty Redirect Domain text box, and the missing Package SID:

OakLeaf ToDoAppEditSettings

If you type https://oakleaf-todo.azure-mobile.net/ and click save, you receive the following error:


There’s no apparent capability to delete an app from the list, so open the oakleaf_todo item, click Edit Settings, copy the redirect domain URL to the clipboard, delete the URL from the text box and click Save, which adds a “Your changes were saved” notification to the form.

Open the OakLeaf ToDo item in the list, click Edit Settings, paste the redirect domain URL to the text box and click Save, which adds the same “Your changes were saved” notification to the form.

The App Store’s registration process asserts that Terms of Service and Privacy URLs are required, so click the Basic Information tab, add the path to a 48-px square logo, copy the two URLs to the text boxes and click Save:

OakLeaf ToDoAppBasicInfo

Note: Step 1-2 of Windows Azure Mobile Services Preview Walkthrough–Part 4: Customizing the Windows Store App’s UI specified a 50-px square logo.

Clicking the Start Menu’s OakLeaf ToDo tile now opens the notification page, as expected:


Clicking OK and inserting a ToDoItem displays the repeated notifications described in Windows Azure Mobile Services Preview Walkthrough–Part 3: Pushing Notifications to Windows 8 Users (C#)’s section “7 - Verify the Push Notification Behavior.”

RunAppAfterFixWith ExtraItems

Credit: Thanks to the Windows Azure Mobile Team’s Paul Batum for his assistance in tracking down the source of the problem.


Prerequisites: This section requires a Windows Store Developer Account. To obtain a Windows Store account, follow the steps in the MSDN Library’s Becoming a Windows Store developer topic, unless you have an MSDN Professional or higher subscription. To take advantage of MSDN’s free first-year account benefit, see my How Not to Get a Free Windows Store Developer Account with Your MSDN Subscription Benefit post of 9/14/2012.

You must also have URLs for Terms of Service and Privacy pages that apply to your organization as a whole or the app specifically. OakLeaf Systems’ Terms of Service and Privacy pages are used for this example.

1 - Associate the App with the Windows Store

The first step in the process of registering your Windows Store App for distribution to others is to reserve its Display Name and associate it with the Windows store by following these steps:

1-1. Choose Project, Store, Associate App with Store to open the following form:


1-2. Click the Sign In button to display the Sign In form, type the Microsoft Account (Live ID) name and password you used to obtain a Windows Store account:


1-3. Click Sign In to open the Select an App Name form:


1-4. Click the here link to go to open the Store Dashboard:

2-4 Store Portal Dashboard_thumb[2]

1-5. Click the App Name tile to open the Submit An App form and type the Display Name of the app, OakLeaf ToDo for this example, in the text box:

2-5 Reserve App Name_thumb[2]

1-6 Click the Reserve App Name button to display an updated form:


1-7. Click Save to complete the reservation:


1-8. Return to the Select an App Name form and Select the OakLeaf ToDo item:


1-9. Click Next to display the data to be added to the app’s local manifest:

2-9 App Manifest Data to Save_thumb[2] 

1-10. Click Associate to display the updated package data in Visual Studio 2012’s Package Manifest Designer’s Packaging tab:

2-10 App Manifest Data in Designer_thumb[5]

Notice the added Package.StoreAssociation.xml file at the bottom of Solution Explorer.

1-11. Click the Choose Certificate button to inspect the cert generated by associating the app:

2-11 Choose Certificate Dialog_thumb[2] 

1-12. Click the View Full Certificate button to display its details:

2-12 Certificate Details Dialog_thumb[2]

Notice that this is a self-signed certificate.

2 - Completing the Registration Process

Note: This section is incomplete due to a number of missing image files.

2-1. Review the Configuring Your App page:

Configure Your App

2-1. Open the Push Notifications and Live Connect Services Info – Overview page:


2-2. Click the Representing Your App to Live Connect Users link in the navigation pane and complete the Push Notifications and live Connect Services Info by adding URLs for the Terms of Service and Privacy pages, the URL for your Windows Azure Mobile Service created in Part 1 as the redirect URI, and the location of the 50-px logo file you created in Part 4:


2-3 Click the App Package tile to open the Create App Packages form:


2-4 Select your app in the App Name list and click Next to display the Select and Configure Packages form:


2-5. Accept the defaults and click Create to create the package and confirm it:


The Cloud Zone is brought to you in partnership with Internap. Read Bare-Metal Cloud 101 to learn about bare-metal cloud and how it has emerged as a way to complement virtualized services.


Published at DZone with permission of Roger Jennings. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}