Updated Windows Azure Toolkit for Windows 8 Consumer Preview

On Friday we released the an update to the Windows Azure Toolkit for Windows 8 Consumer Preview. This version of the toolkit adds a Service Bus sample, Raw Notification sample and Diagnostics to the WnsRecipe NuGet. You can download the self-extracting package on Codeplex from here.

If you are building Windows 8 Metro Style applications with Windows Azure and have not yet downloaded the toolkit I would encourage you to do so.  Why?, as a quick demonstration the following video shows how you can use the toolkit to build a Windows 8 Metro Style application that uses Windows Azure and the Windows Push Notification Service (WNS) to send Toast, Tile and Badge notifications to your Windows 8 Consumer Preview apps in under 4 minutes.


You can view/download the hi-def version of the video on channel 9 here

What’s in it?

  • Automated Install – Scripted install of all dependencies including Visual Studio 2010 Express and the Windows Azure SDK on Windows 8 Consumer Preview.
  • Project Templates – Client project templates for Windows 8 Metro Style apps in Dev 11 for both XAML/C# and HTML5/JS with a supporting server-side Windows Azure Project for Visual Studio 2010.
  • NuGet Packages – Throughout the development of the project templates we have extracted the functionality into NuGet Packages for example the WNSRecipe NuGet provides a simple managed API for authenticating against WNS, constructing notification payloads and posting the notification to WNS. This reduces the effort to send a Toast, Tile, Badge or Raw notification to about three lines of code. You can find a full list of the other packages created support Push Notifications and the sample ACS scenarios here and full source in the toolkit under /Libraries.
  • Samples  – Five sample applications demonstrating different ways Windows 8 Metro Style apps can use Push Notifications, ACS and Service Bus
  • Documentation – Extensive documentation including install, file new project walkthrough, samples and deployment to Windows Azure.

Want More?

If you would like to learn more about the Windows Push Notification Service and the Windows Azure Toolkit for Windows 8 check out the following videos.

Building Metro Style apps that use Windows Azure Service Bus

You can view/download the hi-def version of the video on channel 9 here

Sending Push Notifications to Windows 8 and Windows Phone 7 Devices using Windows Azure

You can view/download the hi-def version of the video on channel 9 here

Building Metro Style apps that use Push Notifications

You can view/download the hi-def version of the video on channel 9 here

Building Metro Style apps that use the Access Control Service

You can view/download the hi-def version of the video on channel 9 here

For more details, please refer to the following posts:

Please ping me on twitter to let me know if you have any feedback or questions @cloudnick

Enjoy,
Nick

Sample using Windows Azure Service Bus from a Windows 8 Metro Style App

I wanted to showcase a Sample application we recently distributed in the Windows Azure Toolkit for Windows 8.  I will post a more detailed code based blog in the near future but for now I wanted to share with you how to get up and running with the Sample application.  Special thanks to Will Perry and the Windows Azure Service Bus  team for putting the sample together.

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.

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 Serviceselement. Service Bus
  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. Service Bus
  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. Service BusRecord 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. Service Bus
  6. In the Properties right pane, locate the Service Bus section and click the Default Key Viewbutton. Service BusRecord the value shown for Default Issuer a Default Key, and click OK. You will need these values later when configuring your Web Role settings. Service BusNow that you have your Service Namespace, Default Issuer and Default Key you are ready to configure the application.
  7. Open Visual Studio 11.
  8. Open the Microsoft.Samples.ServiceBus.Metro.sln solution located in the Samples\ServiceBusfolder.
  9. 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. Service Bus
  10. 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.
  11. Press F5to run the application. Service Bus
  12. 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. Service Bus
    2. Simple Topics: Explore the basic functionality of a Service Bus Topic including Create, Subscribe, Send and Delete. Service Bus
    3. Peek Lock: Explore alternate receive semantics you can use when reading messages from Service Bus. Service Bus

If you would like to learn more please see this video on channel 9:

or download it directly from channel 9

Decks for DevConnection talks

Thank you all for attending my talks at DevConnections Las Vegas.  Per your request here are the powerpoint decks:

If you are building an app related to any of the content above or if you are presenting this content at a user group or other event I would love to hear about it!  Please reach out to me on twitter @cloudnick

Enjoy,

Nick

Devices + Cloud Using Windows Azure with WP7, iOS, Android

Here is a talk I recently gave at TechDays Belgium

So, you’re building apps that span multiple devices apps and you’re curious about what the cloud can offer. Is it possible to deploy scalable Web apps and services on Windows Azure? How about storing data in the cloud? Is it possible to use the cloud for push notifications to the device? In this session, you’ll learn how to build tablet, Windows Phone, Android and even iOS apps that are backed by scalable cloud services with the Windows Azure platform. This demo-focused session will cover the end-to-end experience and address how to tackle issues such as authentication, storage and notifications across a wide range of devices.

or you can watch it directly here on channel 9

Enjoy,
Nick

Delivering Toast Tile and Badge Notifications to Windows 8 and Windows Phone using Windows Azure

Here is a recent talk I gave at TechDays Belgium.

Notifications extend the reach of your app to the desktop and device, but with a large user base timely delivery can be challenging without the right tools. In this session we’ll review the notification options available to Windows Phone and Windows Metro Style apps, demonstrate how you can deliver notifications using Windows Azure, and discuss features provided by Windows Azure to scale your notification solution. By the end of this session you will understand how to use Windows Azure to rapidly develop a notification enabled service for Windows Phone and Windows 8 apps.

or watch direct from channel 9

Enjoy,
Nick

Windows Azure Toolkit for Windows 8 Version 1.1.0 CTP Released

Today we released version 1.1.0 (CTP)of the Windows Azure Toolkit for Windows 8. This release includes the following changes to the Windows Azure toolkit for Windows 8:

  • Dependency Checker updated to reference latest releases.
  • MVC Website code cleanup and improvements to send notifications dialog
  • WNS Recipe Updated WNS Recipe to add Audio support.
  • NuGets project template refactored to make use of NuGets which people can also use directly in their existing apps.
  • notification.js created for client apps to easily communicate the Registration Service i.e WindowsAzure.Notifications NuGet.
  • Samples The samples are currently undergoing churn and will be updated in the coming drop. Added Margie’s Travel CTP as a Sample application

As a brief preview to the CTP toolkit check out this 3 minute video to see how you can get a jump start using Windows Azure Toolkit for Windows 8 to send Push Notifications with Windows Azure and the Windows Push Notification Service (WNS). This demonstration uses the Windows Azure Toolkit for Windows 8 that includes full end to end scenario for Tile and Badge notifications with Toast notifications only a drop down away :)

Note: This release is a ‘CTP’ release as it has not yet gone through our full QA process. We have released this as a CTP as it updates a number of key issues that users were facing with dependency checks and the file new project experience. We will be releasing a final version of the 1.1.x branch in the coming days once it has undergone the full QA tests and also has refreshed documentation. Until this updated drop is made the CTP is the recommended download for users to proceed with.

Enjoy,

Nick

Windows Azure at Seattle Interactive Conference

Hi All, Come join the team and I to learn about Windows Azure @

Technical Content, Technical Experts

The Cloud Experience track at SIC is for experienced developers who want to learn how to leverage the cloud for mobile, social and web app scenarios. No matter what platform or technology you choose to develop for, these sessions will provide you with a deeper understanding of cloud architecture, back end services and business models so you can scale for user demand and grow your business.

Register today using the promo code “azure 200″ and attend SIC for only $150 (a $200 savings).

Attend a full day of technical sessions and learn more about leveraging the cloud for mobile, web and social scenarios. View the list of confirmed Cloud Experience speakers. Sessions include:

  • Great Mobile Apps Make Money – Intro to Cloud Experience Track
  • Mobile + Cloud, Building Mobile Applications with Windows Azure
  • Zero to Hero: Windows Phone, Android, iOS Development in the Cloud
  • Building Web Applications with Windows Azure
  • Building Social Games on Windows Azure

Cloud Experience speakers and technical experts will be available to provide technical assistance and resources for developing, deploying and managing mobile, social and web apps in the cloud.

Windows Azure DevCamps Coming to Silicon Valley

At the Windows Azure DevCamps, you’ll learn from Windows Azure experts and have hands-on time to apply what you’ve learned.

We’ve already held events in India including Bangalore, Delhi, Chennai, and Mumbai where hundreds of developers learned about the new enhancements to the Windows Azure Platform. In the United Kingdom we ran a Windows Azure DevCamp to teach the fundamentals to developers at local area Start Ups!

What will we cover?

On Day 1:

Microsoft Windows Azure Experts will cover the following topics:

  • Getting Started with Windows Azure
  • Using Windows Azure Storage
  • Understanding SQL Azure
  • Securing, Connecting, and Scaling Windows Azure Solutions
  • Windows Azure Application Scenarios
  • Launching Your Windows Azure App

On Day 2:

You’ll have the opportunity to get hands on developing with Windows Azure. If you’re new to Windows Azure, we have step-by-step labs that you can go through to get started right away. If you’re already familiar with Windows Azure, you’ll have the option to do build an application using the new Windows Azure features and show it off to the other attendees for the chance to win prizes. Either way, Windows Azure experts will be on hand to help.

How much does it cost?

Windows Azure DevCamps are FREE and open to everyone.  We’ll provide snacks, but attendees are responsible for lunch, transportation, and any associated expenses.

What do I need to bring?

Just a laptop to complete the labs.  We’ll provide the rest.

How do I sign up?

We’re holding our first U.S. event in Silicon Valley on 10/28-10/29 and you can register for this event now.

Follow us!

To stay up to speed with new event listings, content updates and other announcements follow the WindowsAzure DevCamps team @AzureDevCamps.

Delivering Notifications using Windows Azure and Windows Push Notification Service

Over the past little while I have had the pleasure of building the Windows Azure Toolkit for Windows 8. The following is a re-post of my official post on the Windows Azure Blog.

The Windows Azure Toolkit for Windows 8 is designed to make it easier for developers to create a Windows Metro style application that can harness the power of Windows Azure Compute and Storage. It includes a Windows 8 Cloud Application project template for Visual Studio that makes it easier for developers to create a Windows Metro style application that utilizes services in Windows Azure. This template generates a Windows Azure project, an ASP.NET MVC 3 project, and a Windows Metro style JavaScript application project.  Immediately out-of-the-box the client and cloud projects integrate to enable push notifications with the Windows Push Notification Service (WNS). In Addition, the Windows Azure project demonstrates how to use the WNS recipe and how to leverage Windows Azure Blob and Table storage.

The Windows Azure Toolkit for Windows 8 is available for download.

Push Notification Cloud Service Architecture

For those of you who are familiar with working with Windows Phone 7 and the Microsoft Push Notification Service (MPNS), you will be happy to know that the Windows Push Notification service (WNS) is quite similar. Let’s take a look at a birds-eye architectural view of how WNS works.

Windows Push Notification Service and Windows Azure

The process of sending a notification requires few steps:

  1. Request a channel. Utilize the WinRT API to request a Channel Uri from WNS.  The Channel Uri will be the unique identifier you use to send notifications to an application instance.
  2. Register the channel with your Windows Azure cloud services. Once you have your channel you can then store your channel and associate it with any application specific data (e.g user profiles and such) until your services decide that it’s time to send a notification to the given channel
  3. Authenticate against WNS. To send notifications to your channel URI you are first required to Authenticate against WNS using OAuth2 to retrieve a token to be used for each subsequent notification that you push to WNS.
  4. Push notification to channel recipient. Once you have your channel, notification payload and WNS access token you can then perform an HttpWebRequest to post your notification to WNS for delivery to your client.

Fortunately, the Windows Azure Toolkit for Windows 8 accelerates development by providing a set of project templates that enable you to start delivering notifications from your Windows Azure cloud service with a simple file new project experience.  Let’s take a look at the toolkit components.

Toolkit Components

The Windows Azure Toolkit for Windows 8 contains a rich set of assets including a Dependency Checker, Windows Push Notification Service recipe, Dev 11 project templates, VS 2010 project templates and Sample Applications.

Dependency Checker

The dependency checker is designed to help identify and install those missing dependencies required to develop both Windows Metro style apps on and Windows Azure solutions on Windows 8.

Windows Push Notification Service and Windows Azure

Dev 11 Windows Metro style app

The Dev 11 Windows Metro style app provides a simple UI and all the code required to demonstrate how to request a channel from WNS using the WinRT API.  For example, the following listing requests a Channel URI from WNS:

var push = Windows.Networking.PushNotifications;
var promise = push.PushNotificationChannelManager.createPushNotificationChannelForApplicationAsync();

promise.then(function (ch) {
var uri = ch.uri;
var expiry = ch.expirationTime;
updateChannelUri(uri, expiry);
});

Once you have your channel, you then need to register this channel to your Windows Azure cloud service. To do this, the sample app calls into updateChannelUri where we construct a simple JSON payload and POST this up to our WCF REST service running in Windows Azure using the WinJS.xhr API.

function updateChannelUri(channel, channelExpiration) {
if (channel) {
var serverUrl = "https://myservice.com/register";
var payload = { Expiry: channelExpiration.toString(),
URI: channel };

var xhr = new WinJS.xhr({
type: "POST",
url: serverUrl,
headers: { "Content-Type": "application/json; charset=utf-8" },
data: JSON.stringify(payload)
}).then(function (req) { … });
} }

VS 2010 Windows Azure Cloud Project Template

The Windows Azure Cloud project provided by the solution demonstrates several assets for building a Windows Azure service for delivering push notifications.  These assets include:

1.  A WCF REST service for your client applications to register channels and demonstrates how to store them in Windows Azure Table Storage using a TableServiceContext. In the following code listing you can see the simple WCF REST interface exposed by the project.

[ServiceContract]
public interface IWNSUserRegistrationService
{
[WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Bare)]
void Register(WNSPushUserServiceRequest userChannel);

[WebInvoke(Method = "DELETE", BodyStyle = WebMessageBodyStyle.Bare)]
void Unregister(WNSPushUserServiceRequest userChannel);
}

2.  An ASP .NET MVC 3 portal to build and send Toast, Tile and Badge notifications to clients using the WNS recipe.

Send notifications using the Windows Push Notification Service and Windows Azure

3.  An example of how to utilize Blob Storage for Tile and Toast notification images.

Using Windows Azure Blob Storage for Tiles and Toast notifications

4.  A Windows Push Notification Recipe used by the portal that provides a simple managed API for authenticating against WNS, constructing payloads and posting the notification to WNS.

using Windows.Recipes.Push.Notifications;
using Windows.Recipes.Push.Notifications.Security;

...

//Construct a WNSAccessTokenProvider which will accquire an access token from WNS
IAccessTokenProvider _tokenProvider = new WNSAccessTokenProvider("ms-app%3A%2F%2FS-1-15-2-1633617344-1232597856-4562071667-7893084900-2692585271-282905334-531217761", "XEvTg3USjIpvdWLBFcv44sJHRKcid43QXWfNx3YiJ4g");

//Construct a toast notification for a given CchannelUrl
var toast = new ToastNotification(_tokenProvider)
{
ChannelUrl = "https://db3.notify.windows.com/?token=AQI8iP%2OtQE%3d";
ToastType = ToastType.ToastImageAndText02;
Image = "https://127.0.0.1/devstoreaccount1/tiles/WindowsAzureLogo.png";
Text = new List<string> {"Sending notifications from a Windows Azure WebRole"};
};

//Send the notification to WNS
NotificationSendResult result = toast.Send();

5.  As you can see the Windows Push Notification Recipe simplifies the amount of code required to send your notification down to 3 lines.

The net end result of each of these assets is a notification as demonstrated in the below screenshot of a Toast delivered using the Windows Azure Toolkit for Windows 8.

Sending Toast notifications on Windows 8

As an exercise, it is recommended to spend some time using the website to explore the rich set of templates available to each of the Toast, Tile and Badge notification types.

Sample applications

At present there are also two sample applications included in the toolkit that demonstrate the usage of other Windows Azure features:

  1. PNWorker: This sample demonstrates how you can utlize Windows Azure Storage Queues to offload the work of delivering notifications to a Windows Azure Worker Role.  For more details please see the CodePlex documentation.
  2. ACSMetroClient: An example of how to use ACS in your Windows Metro style applications.  For more details please see this post by Vittorio Bertocci.
  3. Margie’s Travel: As seen in the demo keynote by John Shewchuk, Margie’s Travel is a sample application that shows how a Metro style app can work with Windows Azure. For more details please see this post by Wade Wegner. This sample application will ship shortly after the //build conferene.

Summary

The Windows Azure Toolkit for Windows 8 provides developers a rich set of re-useable assets that demonstrate how to start using Windows Azure quickly from Metro style applications in Windows 8.  To download the toolkit and see a step by step walkthrough please see the Windows Azure Toolkit for Windows 8.

Please feel free to subscribe to my RSS or follow me on twitter at @cloudnick.

Using the new Windows Azure Tools v1.4 for VS2010

The new Windows Azure Tools for v1.4 (August 2011) for VS2010 have just been released.  You can download them using Web Platform Installer here. This latest version of the tools introduces several new features as follows:
  1. Support for Multiple Service Configurations
  2. Profiling support for Windows Azure apps running in Windows Azure
  3. MVC 3 web role support
  4. Package validation
Note: Profiling is only supported in VS 2010  Ultimate+Premium.  All others are available from Visual Web Developer 2010 and up.
This post will take a brief look at the benefits each of these new features bring to you – the developer :)

 

Multiple Service Configurations

Gone are the days of having to change your settings in your ServiceConfiguration.cscfg when you switch from debugging your local cloud+storage emulator to publishing up to Windows Azure.  For example in your development environment for:
  1. local debug you may want to:
    • utilize 1 instance of your web/worker role
    • use the local storage emulator
  2. whereas in Windows Azure you may want to:
    • utilize 4 instances of your web/worker role
    • use a production Windows Azure storage account
To achieve this using the new multiple service configurations is easy.
  1. Create a new Windows Azure project with an arbitrary web or worker role.
    • File > New Project > Cloud > Windows Azure Project
    • Select a web or worker role and press OK
  2. Observe that the ServiceConfiguration.cscfg is now split by default into two files:
    • ServiceConfiguration.Local.cscfg – default used when debugging in VS
    • ServiceConfiguration.Cloud.cscfg – a config you can use on publish
  3. To configure each individual configuration with the settings we desired above.
    • Double click on the WorkerRole1 in the roles folder of the cloud project
    • then and select the Service Configuration dropdown for Cloud
    • Select Service Configuration Profile

    • Set the desired settings for your Cloud profile ServiceConfiguration.Cloud.cscfg

  4. You can then repeat the above for your Local configuration profile to setup and set the desired settings for ServiceConfiguration.Local.cscfg
  5. The net result is that both ServiceConfiguration.Cloud.cscfg and ServiceConfiguration.Local.cscfg will now have their independent settings as follows:
      Independent config in ServiceConfiguration.Cloud.cscfg

      Independent config in ServiceConfiguration.Cloud.cscfg

      Independent config in ServiceConfiguration.Local.cscfg

      Independent config in ServiceConfiguration.Local.cscfg

  6. When you hit debug now the ServiceConfiguration.Local.cscfg is used and when you hit publish you can select which Config you would like to use:

Overall its quite an easy experience to configure and use multiple Service Configuration profiles for your different environments.  Please note that you can also rename and add additional Service Configuration profiles perhaps such that you would have a config for Local, Staging and Prod.  For more detail on how to work with Service Configuration files please see Configuring a Windows Azure Application.

Profiling Support

This is an incredibly useful tool for any Windows Azure developer as it enables you to profile your Windows Azure application that’s running up in Windows Azure.  The information gathered can help analyze any performance issues you may be facing.  When you publish your application from VS you are able to specify your profiling options that will apply for the profiling session and results can be pulled for each instance.
The supported profiling options are as follows:
  1. CPU Sampling – Monitor CPU-bound applications with low overhead
  2. Instrumentation – Measure function call counts and timing
  3. .NET Memory Allocation (Sampling) – Track managed memory allocation
  4. Concurrency -Detect threads waiting for other threads
In this segment I will demonstrate how to configure a profiling session for a Windows Azure Application:
  1. Open your existing cloud project and right click on the windows azure cloud project and select Publish
  2. Select the Enable profiling option on the publish page and click settings
  3. Select the type of profiling you wish to perform in this case .NET Memory Allocation
  4. Note: Checking the Enable Tier Interaction Profiling option captures additional information about execution times of synchronous ADO.NET calls in functions of multi-tiered applications that communicate with one or more databases.  With the absence of a SQL Profiler in SQL Azure this feature is useful for those developers who want to gain some insight into what queries or stored procedures are running slowly.
  5. Press OK.
  6. Once the deployment is complete and the application has been running for a period of time you can go and download the captured profiling report.
  7. To download the profiling report
    • Select View > Server Explorer
    • Expand Windows Azure Compute
    • Expand the hosted service
    • Right click on the Instance that you want do download the profiling report from and press View Profiling Report
  8. Once the report is downloaded it will open in VS and as you can see the CPU is maxing out
  9. If we change the Current View dropdown to Allocation we can quickly identy a problem method that is using excessive amounts of memory
  10. and finally if we right click and select View Source on the method of interest we can see the offending line causing the allocations
What an awesome tool.  I look forward to digging deeper into the capabilities provided by for Windows Azure Profiling. In the meantime for more information please see – Profiling a Windows Azure Application

 

MVC 3 Web Role Support

ASP .NET MVC 3 web roles are now supported out of the box with the new tools.  You can select ASP .NET MVC 3 from the new Windows Azure project dialog and the required assemblies used by ASP .NET MVC 3 are set to copy local for you.  This results in these assemblies being deployed up to windows azure when you publish your application thus ensuring your MVC 3 application will start when deployed. I know a lot of you are probably thinking Eureka right now and those that may get a little bit too excited may even verbalize it, I know I did :)

To create a new Windows Azure ASP .NET MVC 3 application:

  1. File > New Project > Cloud > Windows Azure Project
  2. Select ASP .NET MVC 3 Web Role, press the > button followed by OK
  3. In the ASP .NET MVC 3 project dialog select settings to suit your preferences and press ok
  4. In solution explorer observe that all the references assemblies for ASP .NET MVC 3 that are not in the GAC in the current Windows Azure gues OS have had their Copy Local property set to true.  The below image shows and example of one of the required reference assemblies that is automatically set to copy local so you dont actually have to do anything :)

From here on in all you have to do is start coding :) – For more information on ASP .NET MVC 3 see this and for a detailed walkthrough of ASP .NET MVC 3 on Windows Azure see this post by Nathan Totten

Package Validation

Last but definitely not least is improved package validation. When you select to create a package or publish your Windows Azure application. Additional warnings or errors are now provided in VS to enable you to fix the problem before you package or publish it.  This as you know will be a great timesaver for details of what package validations are performed please see Troubleshooting Package Validation Errors and Warnings

Time to Download

All in all its an excellent new set of features that focus on improving your productivity and make your dev life a whole lot easier. If you have not already then now would be the time to download using Web Platform Installer :)

happy coding,

Nick

Windows Phone 7 Manufacturer Market Share Stats

The following is a summary of the market share of Windows Phone 7 devices.  The sample is from those devices running applications using the www.AdGAC.com user control.

Device split by manufacturer:

AdGAC Windows Phone 7 Manufacturer Market Share Stats. HTC, Samsung, LG, Dell, Asus

AdGAC Windows Phone 7 Manufacturer Market Share Stats

Device split by model:

AdGAC Windows Phone7 Device Model Market Stats

If you would like to increase your market share through advertising, particularly if you are one of the brands above, please contact www.AdGAC.com

Enjoy,

Nick

Windows Azure Platform Benefits for MSDN Subscribers

I previously posted about how to sign up for a free trial of Azure using your BizSpark account you will be happy to know that announced at MIX11 the offer just got a whole lot better for existing subscribers although I am unsure how or if it applies to new subscribers – If anyone can clarify please do so in the comments.

I have snipped the following excerpt from the following link Windows Azure Platform Benefits for MSDN Subscribers so please visit the original for full details and instructions

Current offer* Updated Offer after April 12, 2011
Services Ultimate, Premium & BizSpark* Ultimate
BizSpark
Premium Professional
Compute 750 hrs Small compute instance 1,500 hrs Small compute instance 1,500 hrs Extra Small compute instance 750 hrs Extra Small compute instance
Storage 10 GB 30GB 25 GB 20 GB
Storage Trans 2,000K 2,000K 1,000K 250K
SQL Azure 5 GB
(Web edition)
5 GB
(Web edition)
1 GB
(Web edition)
1 GB
(Web edition)
Access Control Transactions 1,000K 500K 200K 100K
Service Bus Connections 5 (1 pack of 5) 5 (1 pack of 5) 5 (1 pack of 5) 2 connections
Data transfer
out
14 GB (NA/Europe) /
5 GB (Asia)
35 GB (WW) 30 GB (WW) 25 GB (WW)
Data transfer
in
7 GB (NA/Europe) /
5 GB (Asia)
35 GB (WW) 30 GB (WW) 25 GB (WW)

* Current Windows Azure platform subscribers of the MSDN premium offer will be automatically upgraded to the MSDN Ultimate offer. For all usage that exceeds the free allocation above, customers will be charged at standard rates. To avoid charges customers should closely monitor their usage.

See this for some more major Windows Azure Announcements made at MIX11

Enjoy,

Nick

Windows Phone 7 Social Viewer Application Template Released

Hi Guys,

The Social Viewer application template enables you to create mashups from Twitter, Facebook, RSS and Atom feeds with all the plumbing for security, sharing, offline, Trial mode and advertising support built in.

I have tried it out and the Social Viewer template really rocks its makes it extreemly fast and simple to create a mashup WP7 app.  Nick Randolph (Built To Roam) has really done an awesome job on this template.

You can get the full details, and template from Dave Glover in this blog posting. Also note he has mentioned a limited number of Tokens available to Australian devs for free WP7 marketplace registration – quite generous and a surefire way to kickstart your WP7 dev.

If you would like to see an app built with the Social Viewer template try out the Perez Hilton Reader

Kind Regards,

Nick Harris

We Love Windows Phone community video rocks

Announced at Mix11 at the start of the the Day 2 Keynote: Windows Phone fan Brandon Foy inspired our community and inspired Microsoft with his “We Love Windows Phone” video. We want to thank him by jump starting his resume. If just 200k people view his new video, we’ll air it in a national ad spot!

Now thats how funky the ads should be :) , lets get him up to 200k

Enjoy,
Nick

How to Sign Up for an account to Access SQL Azure for FREE

Sign Up for an account to Access  SQL Azure for FREE
There are two ways you can try SQL Azure FREE of charge:

  1. Sign up for this limited-time promotion, and you’ll get TWO 1GB Web Edition databases for one month. No credit card information is required. To get started, insert promo code SQLAZURE25 Note: at the time of writing this includes
    • Windows Azure
      • 3 Small Compute Instances
      • 3 GB of Storage
      • 250,000 Storage Transactions
    • SQL Azure
      • Two 1 GB Web Edition Database
    • AppFabric
      • 100,000 Access Control Transactions
      • 2 Bus Service Connections
    • Data Transfers
      • 3 GB In
      • 3 GB Out
  2. Get a 1GB Web Edition database for no charge for 3 months. This account requires a credit card, as any additional usage above 1GB will be billed at standard rates. After the Free Trial period, you can switch to a paid account without losing your data

For details please on the FREE access pelase see www.sqlazure.com/getstarted and visit www.sqlazure.com/community for additional resources.  And if your not already watching Cloud Cover then you should be :)

WP7 Nights at the Round Table Slide Deck March 31st

Hi there,

For those of you that were asking for the links here is the slide deck Meeting_WP7_Nights_at_the_Round_Table_Mar2011, that was presented on my phone :)

All in all a great night and we seen several cool new WP7  apps.

The app of the night was Mix11. Check it out here on Zune its free and will surely come in handy this month if your heading to Mix11 @ LA.  Description of Mix11 app follows:

Attending the Microsoft MIX11 conference in Las Vegas, April 2011? You need the complete shcedule on your Windows Phone 7 for quick and easy offline reference. Includes session information, speaker bios, a map and news feed. Favorite the sessions you plan on attending so you don’t accidentally miss one!

NOTE: the final schedule will not be announced until much closer to the date in April – the app will update over wifi or 3G. Until then, browse the schedules from previous conferences and watch the recorded sessions.

For those of you who dont have PowerPoint here is the March Rollup:

  1. Azure
  2. Windows Phone 7

Enjoy,
Nick

Part One – Provision and Deploy to SQL Azure Reporting Services

In many enterprise applications one often overlooked, in respect to their importance, requirement are reports. Reports are typically consumed by upper management of the organisation to determine the health of their organisation through the organisational data collected and crunched by their enterprise app. Fortunately Azure provides SQL Azure Reporting, currently in Limited CTP, to extend the already familiar development experience of SSRS to the cloud.

This is part one of a series on SQL Azure Reporting Limited CTP.  This post will focus on deployment of an SSRS report to the SQL Azure Reporting Limited CTP.  Following posts will detail how to programmatically consume these reports.

Sign Up for a Free account to Access SQL Azure
If you would like to follow along with this post there are currently two ways you can try SQL Azure FREE of charge:

  1. Sign up for this limited-time promotion, and you’ll get TWO 1GB Web Edition databases for one month. No credit card information is required. To get started, insert promo code SQLAZURE25
  2. Get a 1GB Web Edition database for no charge for 3 months. This account requires a credit card, as any additional usage above 1GB will be billed at standard rates. After the Free Trial period, you can switch to a paid account without losing your data

For details please on the FREE access pelase see www.sqlazure.com/getstarted and visit www.sqlazure.com/community for additional resources.

Once you have your account you will need to Sign Up for Access to the SQL Azure Reporting Services CTP

  1. In the Azure Management Portal click on the Reporting in the left nav bar and follow the instructions

    Sign Up for SQL Azure Reporting Services CTP

    Sign Up for SQL Azure Reporting Services CTP

  2. At some point later (in my case 1 to 2 weeks) you will receive an email with your invite and access code for the beta. Once you receive this you need to login the the portal as per above and then press the 2. Provision option and select an appropriate subscription

    Provision step 1

    Provision step 1

  3. Supply the token code provided on email

    token code

    token code

Create your Reporting Project
The development experience in VS2010 with regard to Reporting projects synonymous with Windows Mobile development i.e not supported, unless you want client reports *.rdlc. To me this raises similar questions to that of the huge leap forward seen in Windows Mobile to Windows Phone 7 – Will we soon see a similar leap forward in support for Reporting in the next release of Visual Studio? – I dont know the answer but if I had to take a pick project Cresent is looking like it will be a contender.

This being said that the way to build your reports is using SQL Server Business Intelligence Development Studio (BIDS) which is installed with SQL Server 2008 as follows:

  1. To Start BIDS goto Start >> All Programs >> Microsoft SQL Server 2008 R2 >> SQL Server Business Intelligence Development Studio
  2. Create Report project File >> New Project >> Business Intelligence Projects >> Report Server Project

    Create Report Project

    Create Report Project

  3. Create Shared Data Source  to retrieve content from your SQL Azure Database.  In the  Solution Explorer right click the Shared Data sources folder
       >> Press Add New Data Source
    • Note: At the time of writing this post please note that the SQL Azure Reporting CTP is currently only hosted in our South Central US datacenter – we strongly recommend that you host any servers and databases you might use for your reporting testing needs at this datacenter. You will be charged for bandwidth usage for data transfers to/from the South Central US datacenter should you host your data that you report against outside of this datacenter. Also, co-locating with the service will provide optimal performance.
    • Note: While Shared Data Sources are supported Shared Datasets are not currently supported in this Limited CTP
  4. Select Microsoft SQL Azure in the Type dropdown of the shared datasource properties and use the Edit button to configure and test your connection string to your Database.

    Shared Data Source Properties - General

    Shared Data Source Properties - General

  5. In Solution Explorer >> Right click on the Reports folder >> Select Add a New Report and define a report against your shared datasource.  For links to resources about learning to author reports, see SQL Azure Reporting Resources.  The image below illustrates the report design view against my shared data source.

    Report Definition

    Report Definition

  6. Note: Once you have finished defining your report you can press the preview tab (next to Design tab in the above image) to preview the report.

Deployment

  1. In a browser go to the Azure Management Portal >> select Reporting from the left Nav and then expand out your report subscription to reveal the Web Service URL and username configured through the initial provisioning process.  The image below highlights the two

    Reporting Service Details

    Reporting Service Details

  2. In Solution Explorer >> Right click your  reporting project >> select Properties
  3. Copy the Web Service URL text from the Portal as per image above in step 1 and format the url to be https://<url from management portal>/reportserver    – Note: the https  and /reportserver.  If you are getting an issue when deploying as follows When deploying the project or an item in the project, you get the error message: Could not connect to the report server …. Verify that the TargetServerURL is valid… the common cause is not formatting the url correctly.  Once your done it should be in a form similar to https://fghijk5678.database.windows.net/reportserver
  4. Press Ok on the properties dialog
  5. To Deploy to SQL Azure Reporting go to Solution Explorer >> Right click your reporting project >> Select Deploy
  6. A dialog will popup prompting for your reporting services login.  This will be the username as shown in the image in step 1 above and the password you supplied during the provisioning process.  Enter them and press Ok

    Deploy to SQL Azure Reporting. Report Portal Username and Password

    Deploy to SQL Azure Reporting. Report Portal Username and Password

  7. If deploy was unsuccessful please see the Troubleshooting section towards the bottome of this post.

Verifying your deployed Report

  1. Take the URL configured in step 3 above i.e it should be in the form https://<url from management portal>/reportserver   and append /login.aspx e.g the final form will be https://fghijk5678.database.windows.net/reportserver/login.aspx 
  2. Browse to your report server using your browser and when prompted use the same username and credential supplied when deploying your reporting project in step 6 above.

    Login

    Login

  3. Once logged in Browse to your reports folder and select your report to render
    Rendered Report - SQL Azure Reporting

    Rendered Report - SQL Azure Reporting

Troubleshooting Deployments

  1. Check out the SQL Azure Reporting Limited CTP release notes for solutions to common problems

Documentation and Feeback

  1. Documentation for getting started and using the SQL Azure Reporting CTP can be found in the SQL Azure library on MSDN here
  2. You can provide us feedback through the Connect site (here) and filing a Bug or Suggestion (Select Category = “SQL Azure Reporting) or by visiting the SQL Azure forum
  3. To vote on feature requests and make suggestions for V1 features, please visit http://www.mygreatsqlazurereportingidea.com/

Summary

This post detailed how to provision, deploy and view reports to/on SQL Azure Reporting Limited CTP.  The next post in this series will detail how to programmatically consume these reports.

WP7 Nights at the Round Table – March 31

Hi there Windows Phone 7 Developers in Sydney Australia,

Time to get out from infront of the computer and into the bar to talk about Windows Phone 7 and Azure Dev :)

Event:
WP7 Nights at the Round Table – March 31st Sydney

Purpose:
Let’s get together for some drinks to trade WP7 Dev stories, demos or seek free advice from other devs to help get your app off the ground and into Marketplace. This event will be informal, around bar tables, so bring along your device or laptop if you wish to show people what you have been up to.

Let us know your coming:

If your on LinkedIn please indicate your attendance here – Windows Phone 7 Developer Dev Drinks March 31st or in the comments section below.

Date, Time, Location:

6-8pm
Thurs 31st March 2010
City Hotel,
Corner of King and Kent St, Sydney CBD.

Hope to see you there,

Nick Harris :)

Geography STDistance and Radial Search

I am currently whittling away, unfortunately rather slowly, on a new blog post series that makes use of the spatial data capabilities provided by both SQL Azure + SQL Server 2008 R2 that then exposes the content to be consumed by a WP7 client.

In the meantime while I chip away on that I was sitting wondering why my recent flight to the US was faster from San Fran to Sydney then from Sydney to LA. Taking away the variables such as head/tail winds, airspeed and flight plan, yes all important factors, we can quite easily get a raw view of the direct distance from San Fran to Sydney and LA to Sydney using spatial data and the OGC methods on the geography type – cool :)

But first we need some data i.e the latitude and longitude of the three airports. You can quite easily retrieve these manually from bing maps by saving the points in your My places with a Right Click >> Add Push Pin then once you have all three clicking Actions >> Export you can retrieve the lat + long of each place. If you wanted to automate the process you could using the Bing Maps API to geocode the address to your lat/long

The result of the manual export from bing maps is as follows, we are only interested in the lat and long for this post:

<?xml version="1.0" encoding="utf-8"?>
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.1" creator="Bing Maps" xmlns="http://www.topografix.com/GPX/1/1">
<metadata>
<name>Unsaved places</name>
<desc />
</metadata>
<wpt lat="37.6235624402761" lon="-122.383551299572">
<name>San Francisco Int'l Airport</name>
<desc>San Francisco, CA 94128</desc>
</wpt>
<wpt lat="33.946468" lon="-118.384506">
<name>Los Angeles Airport Marriott</name>
<desc>5855 W Century Blvd, Los Angeles, CA</desc>
</wpt>
<wpt lat="-33.936897" lon="151.168334">
<name>Sydney Airport Medical Centre</name>
<desc>International Terminal, Mascot, NSW 2020</desc>
</wpt>
</gpx>

Calculating the distance:

-- using the geography datatype for round earth calculations rather then geometry(flat earth)
DECLARE @SanFran geography
DECLARE @LA geography
DECLARE @Syd geography

-- define the points
SET @SanFran = geography::Point(37.6235624402761, -122.383551299572, 4326)
SET @LA = geography::Point(33.946468, -118.384506, 4326)
SET @Syd = geography::Point(-33.936897, 151.168334, 4326)

-- calculate the distance between points in km
SELECT @Syd.STDistance(@SanFran)/1000 as SydToSanFran
SELECT @Syd.STDistance(@LA)/1000 as SydToLA

Results:
Sydney to San Fran: 11936.3 km
Sydney to LA: 12053 km

From this simple calc we can see that San Fran is in fact closer to Sydney then LA.

While this is a simple example you can apply what you have learnt here to perform radial searches. e.g if you have a table of Airports with their co-ordinates located in a Location column and wanted to see what airports were within a 13000 km radius you could do:

DECLARE @Origin geography
SET @Origin = geography::Point(<YourLat>,<YourLong> , 4326)

SELECT *
FROM dbo.Airports
WHERE Location.STDistance(@Origin) <= 13000000

Enjoy,
Nick

WP7 Nights at the Round Table Slide Deck Feb

Hi there,

For those of you that were asking for the links here is the slide deck, that was presented on my phone :)

All in all a great night and we seen several cool new WP7  apps some of which were supported by Azure services.

The app of the night was What I Ate and Drank – a WP7 app with services and site both up on Azure. Check it out here on Zune its free.

Note: we are in need of a Logo if you got the design skills please feel free to create our group a free logo – creative inspiration could include WP7, Knights, Azure, Cloud Power, Sydney

Kind Regards,
Nick Harris

WP7 Nights at the Round Table – Feb 28

Hi there Windows Phone 7 Developers in Sydney Australia,

Time to get out from infront of the computer and into the bar to talk about windows phone 7 dev and Azure :)

Event:
WP7 Nights at the Round Table – Feb 28th Sydney

Purpose:
Let’s get together for some drinks to trade WP7 Dev stories, demos or seek free advice from other devs to help get your app off the ground and into Marketplace. This event will be informal, around bar tables, so bring along your device or laptop if you wish to show people what you have been up to.

Let us know your coming:

If your on LinkedIn please indicate your attendance here – Windows Phone 7 Developer Dev Drinks Feb 28th or in the comments section below.

Date, Time, Location:

6-8pm
Tues 28th Feb 2010
City Hotel,
Corner of King and Kent St, Sydney CBD.

Hope to see you there,

Nick Harris :)

Windows Azure Service Management CmdLets and Azure SDK refresh Feb

If have applied the Azure SDK Feb Refresh and wanted to install the Windows Azure Service Management CmdLets you may find that the dependency check for Windows Azure Software Development Kit 1.3 fails.

The solution is simple – Update C:\WASMCmdlets\setup\scripts\dependencies\check\CheckAzureSDK.ps1 to check for the latest version of the SDK.

Before:

$res1 = SearchUninstall -SearchFor 'Windows Azure SDK*' -SearchVersion '1.3.11122.0038' -UninstallKey 'HKLM:SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\';
$res2 = SearchUninstall -SearchFor 'Windows Azure SDK*' -SearchVersion '1.3.11122.0038' -UninstallKey 'HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\';

($res1 -or $res2)

After:

...
$res1 = SearchUninstall -SearchFor 'Windows Azure SDK*' -SearchVersion '1.3.11122.0038' -UninstallKey 'HKLM:SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\';
$res2 = SearchUninstall -SearchFor 'Windows Azure SDK*' -SearchVersion '1.3.11122.0038' -UninstallKey 'HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\';
$res3 = SearchUninstall -SearchFor 'Windows Azure SDK*' -SearchVersion '1.3.20121.1237' -UninstallKey 'HKLM:SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\';
$res4 = SearchUninstall -SearchFor 'Windows Azure SDK*' -SearchVersion '1.3.20121.1237' -UninstallKey 'HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\';

($res1 -or $res2 -or $res3 -or $res4)

While strictly speaking you could have updated just res1 and res2 – the above less than elegant copy paste solution is provided such that it can support either version

Enjoy,
Nick Harris.

Two Great Competitions one for Windows Phone 7 and one for Azure

Hi there readers,

There are two great competitions I have come across that I think are well worth mentioning.

  1. The Windows Phone 7 LG App Starter Competition now in the Final Round run by Nick Randolph of Built To Roam.
  2. Windows Azure Marketplace: The DataMarket Contest run by codeproject

Both have great prizes and are well worth checking out.  Why not build a WP7 app that consumes free datasets from the Windows Azure Marketplace DataMarket and enter both ? :)

Kind Regards,

Nick Harris

If using Azure Web Role with Full IIS then get the Windows Azure SDK Refresh now

Hi there,

If your using the Windows Azure November SDK v1.3 and have deployed a web role using Full IIS**  then you should get the SDK refresh which contains config and security updates. You can get more info here

Applying the fix

  1. Please download and install the refresh of the November 2010 Tools and SDK (recommended).
    To upgrade just the SDK please use this link (64 bit) or this link (32 bit).
  2. To verify the fix has been applied.:
    1. Start >> Control Panel >> Programs and Features
    2. Find ‘Windows Azure SDK’ and verify the version is now 1.3.20121.1237
  3. Re-package your service.
  4. Upgrade/re-deploy your service in the cloud.

** Note: Full IIS is the default after deploying with v1.3 unless you have specifically removed the <Sites></Sites> element from your ServiceDefinition.csdef to revert to using the legacy hosted web core

Nick