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 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 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

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 – 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

Ad Platform for Windows Phone 7 with launch in Australia

Hey there good people of the internet, 

A while back I blogged about my Adventure Initiation about  2 to 3 weeks into it there was a minor hiccup in the form of an announcement that an Ad Platform being made available for Windows Phone 7.  In the spirit of finishing something that I gave so much to start I am pleased to announce that I have just had my showcase application for Windows Phone 7 certified. 

Just like any other new business you have to be able to perform all roles.  I guess its time to interview myself :)  

Whats is this showcase application?  

Well it is a preview application for AdGAC my Ad Platform for Windows Phone 7

Hold on I read Adventure Initiation you really left your paid employment to build an Ad Platform, are you crazy?  

You need to be  >= a little crazy to make steps forward.  

Well your interviewing yourself so you can tick the crazy box 

It would be my pleasure :)  

Why AdGAC? 

AdGAC, yep the name was inspired by the great .NET GAC :) .  But moreover it stands for Global Ad Community.  One of the biggest things I found I really really, really really, really did not like about advertising was the content rarely connected with anything I was interested in.  So what I did was integrate a toolbar into my Ad Control to allow me, the end user, the choice to personalise my ad experience thus helping with the prioritisation of content.  Furthermore if I configure it once it will it will travel between applications :) .  I see it as a win win win – win^3 – scenario for end users, advertisers and developers.  End users say what they want and hence will be engaged with the advertisers that want to connect with them and developers still make their hard earned cash. 

So what about a demo? 

I have made it so you can download the AdGAC preview application or you can search for it through marketplace using either “adgac” or “advertise” .  Sure, while the containing application is not beautiful it serves the purpose I built it for, that is, a vehicle to demonstrate the beauty of AdGAC Ad Platform i.e the advertisements and engagement model.  Be sure to use the flick up gesture to get your toolbar to personalise your profile for better matched content – note the effectiveness of this will become more apparent as more Ads are made available.  Here are some screenshots. 

AdGAC preview application

AdGAC preview application

AdGAC preview application

AdGAC preview application

What media types are supported for advertiser campaigns? 

We support text, image and animated gifs of dimensions 480×80 px 

What ways can Advertisers target their campaigns to capture the correct audiences attention? 

Currently we have 5 options available and some more under development.  The five available are: 

  1. by audience Interest
  2. by audience Gender
  3. by audience Age
  4. by Device Manufacturer
  5. by Audience Location

You can find more information here 

In what way can the end users interact with the Advertisers ad content , in other words what click action types / calls to action? 

Currently we have 5 options available and some more under development.  The five available are: 

  1. click to Website – good for directing traffic to your website
  2. click to Call – useful for directing calls into your corporate call centre e.g Charity organisations or Pizza companies
  3. click to SMS compose – useful for SMS promotions
  4. click to Marketplace Detail – useful for driving downloads of a single application or music that is available through Microsoft Marketplace
  5. click to Marketplace Search – useful for driving downloads of all your applications or music that is available through Microsoft Marketplace

You can find more information here 

How do you create campaigns and register applications? 

I  also built an accompanying website used by Developers to manage their applications  and  and Advertisers to manage their advertising campaigns www.AdGAC.com

AdGAC website Advertising for Windows Phone 7

AdGAC website Advertising for Windows Phone 7

Looks like you’ve been pretty busy? 

Surely have :)  

Where to now? 

  • Well I have opened the site for registrations of interest.  I would like to gauge stakeholder interest [ thats you :) ]  and would like to run a closed alpha to gather some feedback.   So if you’re a Developer or Advertiser and would like to be involved in the closed alpha then please do jump on the site www.AdGAC.com and go to the developer or advertiser tab and press Register or go direct through here Register and fill out the form
  • This release is streamlined to get the platform out for some feedback.  I have a whole bunch more ambitious ideas and the passion to implement them so stay tuned :)

Thanks for your time Nick 

No problems 

To my dear tech readers -  you now probably understand why the tech posts this month were fewer then usual I look forward to getting you some more tech when I am back from my holiday early Jan .  Until then, happy Christmas and New Year! 

Kind Regards, 

Nick Harris

ASP .NET MVC 3 Beta Deploy to Azure Cycles

If you have just downloaded ASP .NET MVC 3 Beta and upgraded your ASP .NET MVC 2 website then tried to deploy on Azure and found that your deploy is cycling this will likely solve your problem.

Recall while upgrading for MVC 3 Beta you update your project to reference System.Web.Mvc.dll (v3.0.0.0), System.WebPages.dll and System.Web.Helpers.dll – well the likely cause of the issue is you have not updated those three assembly references to copy local i.e Right Click >> Copy Local = True. If you were to deploy at this stage you would still have the cycle issue.  With a quick review of intellitrace logs you you have to add a reference to WebMatrix.Data.dll, System.Web.WebPages.Razor.dll and Microsoft.Web.Infrastructure.dll all of which when run on local are retrieved from the GAC. Therefore the full list of assemblies to copy local becomes:

  • System.Web.Mvc.dll (v3.0.0.0)
  • System.WebPages.dll
  • System.Web.Helpers.dll
  • WebMatrix.Data.dll
  • System.Web.WebPages.Razor.dll
  • Microsoft.Web.Infrastructure.dll
  • Hope this saves you some time
    Nick

    Asynchronous Image download on Windows Phone 7

    When running your solution on local and setting the Source property of the System.Windows.Controls.Image it is not visually apparent that the Image may take some period of time to download simplifying the code the following the original image swap out whereby i was using an arbitrary Uri to an image in Azure Blob Storage that would change at a predefined interval.

    imgContent.Source = new BitmapImage(new Uri(arbitraryImageUriThatKeepsChanging));

    As soon as the image is available from Azure Blob Storage – or any other hosting provider for that matter if you are not using a CDN and are a long way from your host then or the image is of a large size then it is likely that as soon as the image is set the image content becomes empty until the image is downloaded – i found this to be 10 to 30 seconds over the slow bandwidth of my phone.  To have an empty Image control on the screen was not acceptable so the simple solution is to pull down the image asynchronously using a WebClient then once downloaded update the Image.Source as follows:

    Starting the Async download of the image:

    WebClient wc = new WebClient();
    wc.OpenReadCompleted += new OpenReadCompletedEventHandler(wc_OpenReadCompleted);
    wc.OpenReadAsync(new Uri(arbitraryImageUriThatKeepsChanging), wc);

    Handling the completed download and updating the image source – note: have intentionally removed the MVVM implementation here to minimise code in post if using MVVM setup the binding on the Image.Source property to the model Source.

    void wc_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
    {
       if (e.Error == null && !e.Cancelled)
      {
          try
          {
             BitmapImage image = new BitmapImage();
             image.SetSource(e.Result);
             imgContent.Source = image;
          }
          catch (Exception ex)
          {
              //Exception handle appropriately for your app
          }
      }
      else
      {
          //Either cancelled or error handle appropriately for your app
      }

    Async download of Images from Azure to windows phone.

    Note: WebClient executes on the UI thread if you wish to do this on a background thread and then later update the UI you should use HttpWebRequest and then Dispatcher within your response to update the UI thread.

    Note: It would be interesting to configure the Azure CDN to see the improved performance once the node is distributed from a CDN node that is geographically close.

    Nick

    How to Enable IntelliTrace on Windows Azure

    If your Azure project targets the .NET framework 4.0 you can utilize IntelliTrace to help debug your application. This post briefly covers how to enable and retrieve your IntelliTrace log.  The issue I was debugging in this scenario was a service I was deploying and ASP .NET MVC website it was initializing /stopping / initializing / stopping repeatedly during the deploy to Azure.

    1. When publishing your service select the Enable IntelliTrace for .NET 4 roles checkbox
    2. Enable IntelliTrace

      Enable IntelliTrace

    3. Let the instance deploy and cycle through the initializing and stopping states
    4. Then to download your IntelliTrace log.  In Server Explorer expand your windows Azure hosted service node, right click on your hosting account and select View IntelliTrace log.  This will be downloaded Async.
    5. View Intellitrace

      View Intellitrace

    6. Once the log is retrieved you can review the exceptions
    7. IntelliTrace

      IntelliTrace

    8.  In this case I had not set the System.Web.MVC assembly to copy local and re-deployed.  Job done.

    Nick

    Debugging WCF Data Services – An error occured while processing this request

    Issue: I was calling my WCF Data Service today and was getting a NotSupportedException with an InnerException of “An error occured while processing this request” and no further detail which is not very helpful for debugging.

    Solution: So the workaround for this is to set UseVerboseErrors in your service in your service initialization method like so

    public static void InitializeService(DataServiceConfiguration config)
    {
       config.UseVerboseErrors = true;
    
      .....
    
    }

    This however is not good for production scenarios as we don’t want Verbose errors going back to clients.  Given that it is hardcoded to true ideally you would want to be able to configure this in your web.config.  There is no section within the web.config supported out of the box for this.  So you can use an appSetting or create your own custom section.

    after building and deploying the service you should now get the full detail in your exception.InnerException.Message E.g

    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
      <code></code>
      <message xml:lang="en-AU">An error occurred while processing this request.</message>
      <innererror>
        <message>Unable to update the EntitySet 'Posts' because it has a DefiningQuery and no &lt;InsertFunction&gt; element exists in the &lt;ModificationFunctionMapping&gt; element to support the current operation.</message>
        <type>System.Data.UpdateException</type>
        <stacktrace>   at System.Data.SqlClient.SqlGen.DmlSqlGenerator.ExpressionTranslator.Visit(DbScanExpression expression)&#xD;
       at System.Data.SqlClient.SqlGen.DmlSqlGenerator.GenerateInsertSql(DbInsertCommandTree tree, SqlVersion sqlVersion, List`1&amp; parameters)&#xD;
       at System.Data.SqlClient.SqlProviderServices.CreateCommand(DbProviderManifest providerManifest, DbCommandTree commandTree)&#xD;
       at System.Data.Mapping.Update.Internal.UpdateTranslator.CreateCommand(DbModificationCommandTree commandTree)&#xD;
       at System.Data.Mapping.Update.Internal.DynamicUpdateCommand.CreateCommand(UpdateTranslator translator, Dictionary`2 identifierValues)&#xD;
       at System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues)&#xD;
       at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)&#xD;
       at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)&#xD;
       at System.Data.Services.Providers.ObjectContextServiceProvider.SaveChanges()&#xD;
       at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description)&#xD;
       at System.Data.Services.DataService`1.HandleRequest()</stacktrace>
      </innererror>
    </error>
    

    Nick

    Some first time Azure deployment findings

    Today I completed my first couple of deployments of an OData service to Windows Azure hosted in the Geographic Location of “Anywhere Asia”.

    What I liked about the dev experience – As  a complete Azure newb I was able to do the following in under a day :

    1. Migrate an existing SQL 2008 R2 DB to Azure SQL
    2. Connect remotely to the new Azure SQL DB using SQL Management Studio
    3. Create and deploy an OData Service that is fed from the Azure SQL DB
    4. Get some blobs into the Blob storage
    5. Consumed the OData service and Blob from a Windows Phone 7 Application – All I had to do was update the client I created here Consuming an OData service from windows phone 7 to point my TestClient URI to the cloud service rather then my local. 
    6. 16 Months Free*

    What I didn’t like:

    1. Could not find support in Visual Studio 2010 to deploy to SQL Azure directly.  If anyone is aware how please throw a link at me.  I had to gen deployment scripts using SQL Management Studio.  VS 2010 Data compare did not work when compairing between SQL Server 2008 R2 and SQL Azure. Note I did find this project on codeplex which might be handy – SQL Azure Migration Wizard v3.3.5

    2. newsequentialid() is not supported in SQL Azure - makes sense given that the sequential id is partially generated based on the network card therefore does not fit well with sql azure running across multiple machines.  But the issue is to get it up and running quickly i had to update to use newid() so now not sure how fragmented my indexes are going to become and this will have an impact on my insert performance so I will need to revise this.

    3. Unable to upload to blob storage from within Server Explorer.  You can only view your blobs as per image

      below and I had to code a client application just to upload the simple HelloWorld test file you see below :( … Would be great to see an Upload option in the context menu.

      Server explorer azure no blob upload
      Server explorer azure no blob upload
    4. Time to taken to deploy the service that contained only a simple Entity Model and single OData service was quite a while.  But when you look at whats going on under the hood its pretty damn quick althought it would be great to have the output window for the azure deployment indicate exactly whats happening rather then just a few initialising, busy, running statements etc.
    5. If anyone has any helpful links to the issues above – please feel free to post the links in the comments.
    Nick

    Sign up to free trial of Azure using your Bizspark account

    If you are a member of Bizspark you are able to get 8 – 16months “free” Azure hosting.  Cool :)

    To sign up using your Bizspark account select the My Account tab from the MSDN Subscription site. Make sure you read the fine print

    so whats on offer:

    Grabbed the following  from here http://www.microsoft.com/WindowsAzure/offers/popup.aspx?lang=en&locale=en-AU&offer=MS-AZR-0005P

    “This promotional offer provides monthly compute hours, storage, data transfers, SQL Azure databases, Access Control transactions and Service Bus connections for MSDN premium subscribers.

    MSDN Premium Subscription Benefit:

    • Windows Azure
      • 750 hours of a small compute instance
      • 10 GB of storage
      • 1,000,000 storage transactions
    • SQL Azure
      • 3 Web Edition databases (up to 1 GB relational database each)
    • AppFabric
      • 1,000,000 Access Control transactions
      • 1 pack of 5 Service Bus connections
    • Data Transfers
      • North America and Europe (per region)
        • 7 GBs in
        • 14 GBs out
      • Asia Pacific Region
        • 2.5 GB in
        • 5 GB out

    You may utilize up to the above amount of service each month without additional charge for 8 months following sign up for this offer as long as you maintain your MSDN Premium subscription.

    Any usage each month in excess of the MSDN Premium Subscription Benefit will be charged at the MSDN Premium rates.

    MSDN Premium Rates:

    Windows Azure

    • Compute
      • Small instance (default): $0.1253 per hour
      • Medium instance: $0.2506 per hour
      • Large instance: $0.5011 per hour
      • Extra large instance: $1.0022 per hour
    • Storage
      • $0.1649 per GB stored per month
      • $0.011 per 10,000 storage transactions
    • Content Delivery Network (CDN)
      • $0.1649 per GB for data transfers from European and North American locations*
      • $0.2198 per GB for data transfers from other locations*
      • $0.011 per 10,000 transactions*

    SQL Azure

    • Web Edition
      • $10.4286 per database up to 1GB per month
      • $52.14 per database up to 5GB per month**
    • Business Edition – Up to 10 GB relational database
      • $104.3846 per database per month
      • $208.77 per database up to 20GB per month**
      • $313.15 per database up to 30GB per month**
      • $417.54 per database up to 40GB per month**
      • $521.92 per database up to 50GB per month**

    AppFabric

    • Access Control
      • $2.0775 per 100,000 transactions
    • Service Bus
      • $4.1654 per connection on a “pay-as-you-go” basis
      • Pack of 5 connections $10.3874
      • Pack of 25 connections $51.9368
      • Pack of 100 connections $207.7471
      • Pack of 500 connections $1,038.7350

    Data Transfers

    • North America and Europe regions
      • $0.1099 per GB in
      • $0.1649 per GB out
    • Asia Pacific Region
      • $0.3297 per GB in
      • $0.4946 per GB out
    • Inbound data transfers during off-peak times through October 31, 2010 are at no charge. Prices revert to our normal inbound data transfer rates after June 30, 2010.

    *CDN rates are effective for all billing periods that begin subsequent to June 30, 2010. All usage for billing periods beginning prior to July 1, 2010 will not be charged.

    ** SQL Azure 50 GB Business Edition Database and 5 GB Web Edition Database will be available starting on June 28, 2010. “

     

    Some more detail available here http://msdn.microsoft.com/en-us/subscriptions/ee461076.aspx