Friday, December 19, 2008

Azure Cloud Computing User Group December Meetings a Big Success

The Azure Cloud Computing User Group just finished its inaugural meetings in New York, Philadelphia, Chicago, Denver, Phoenix, San Diego, and Orange County. These meetings have been a great success with as many as 50 attendees in some locations. By next month, we're expecting to add meetings in Seattle, Los Angeles, Salt Lake City, Dallas, Houston, and Boston as well. Microsoft has helped out with meeting places and has been very supportive.

The presentation and demo apps for this first meeting have been posted on the CCUG web site. We'll be posting the schedule for January meetings soon as details are firmed up.

Tuesday, December 16, 2008

Dev Fabric Status Colors and Meaning

What do those color indicators mean in the Azure Dev Fabric? Here's a list:

Longer explanation: If you're running your Azure apps locally out of Visual Studio, the Dev Fabric is simulating the cloud environment for you. You can open the Dev Fabric icon by right-clicking the "gears" icon in the system tray. In the Dev Fabric console display you'll see your project, your role(s) (such as WebRole) and your instances. Each instance's status is shown with a colored circle. Since some of these statuses change rather quickly you don't always have a chance to hover over them and see their tooltip explanation.

Here's how the Dev Fabric console looks when it is happy (green):

A fun thing to do is kill one or more of your instances (you can do this using the Windows Task Manager, or en masse using a tool like pskill). Not only will you see a range of status indicators in the Dev Fabric, the instances will be recreated automatically by the fabric, which is very cool to watch happen. This gives you some idea of the intelligence that's wired into the cloud fabric.

Sunday, December 14, 2008

New on CodePlex: AzureLiveID

I've put a new sample on CodePlex that demonstrates Windows Live ID authentication for an Azure web application. "AzureLiveID" is a skeletal Azure web solution that implements Windows Live ID authentication and keeps user profiles in cloud storage. Allowing web users to reference an existing identify is an attractive alternative to forcing them to create yet another user id and password.

AzureLiveID is available on CodePlex.

Saturday, December 13, 2008

Windows Live ID Authentication for your Azure Web Site, Part 1

One of the many services made available to your Azure web applications is the ability to authenticate using Windows Live ID. This is an attractive alternative to forcing the user to create and remember yet another user id and password. You can also wire Live ID in to non-Azure web sites, but in this article we're going to focus specifically on how to Live ID-enable your Azure web application. In Part 1, we'll describe the user experience and the page flow model for Live ID authentication. In Part 2, we'll see what this means in code.

For an Azure web application, Windows Live ID authentication is based on 3-way cooperation between your web site, Windows Live ID, and your Azure project settings.

User Experience and Page Flow

The first thing to understand is the intended user experience. Let's walk through it from the vantage point of a web visitor to your Azure-hosted web site.

1. On your site, not signed in

When a visitor first comes to your site, your site likely won't know who they are unless they've been there very recently. Your site will offer a Sign In link (click the image for a larger view).

2. Live ID sign in

When the user clicks on your Sign In link, their browser will take them to the Windows Live ID system, where the user can sign on with an existing Windows Live ID or create a new one on the spot. Don't worry, you haven't lost the user as you'll see in a moment.

3. Back to your site, authenticated

Upon successful sign in to Windows Live ID, transfer is passed right back to your site. This time, the site knows who you are and is able to read account-specific information from cloud storage. Instead of "Sign in please", the site now welcomes the user with a cheery "Welcome, [Name]!"

Pretty cool, eh? Now let's see just how this magic is made to happen.

Page Flow

Now that we know what the experience is like, let's study the page flow from behind the scenes. Although the user experience seems to involve 3 pages, there are in fact 4 page states to consider as shown in the figure below.

Here's a blow-by-blow account of what happens.

1. On your site, not signed in

When a visitor comes to your site, your site may or may not know who they are. This is determined by a cookie. You include the Live Services IDLoginStatus control on your page, which displays a Sign In link if your Live ID identity is unknown to the site. if it does know who you are, the control will instead display a Sign Out link. Let's assume for the moment we don't know who the user is and the cookie is not found.

In the screen capture below, my site recognizes it does not know who the user is and alters the page display accordingly. This is evidenced by the "Please sign in with Live ID" message (set by code in my Page_Load method) and the Sign In link (provided by the IDLoginStatus control). Note you can control the appearance of the control to match your site's look.

2. Live ID sign in

When the user clicks the Sign In link, the IDLoginStatus control redirects the browser to the Windows Live ID system, where the user can sign on with an existing Windows Live ID or create a new one on the spot. Note the Windows Live ID infrastructure is only willing to participate if your site has been previously registered with it.

3. Authentication Handling

This next step is not apparent to the user but is an integral part of the process. Upon successful sign in to Windows Live ID, transfer is passed back to your site--but not to the originating page. Instead, a web authentication handler page is invoked. How does Live ID know where to direct control? You set up a "return URL" when you register your site with Live ID. Your web authentication handler page is given a unique ID (GUID) for the user and a cookie is created. This GUID is the key you use to provision account-specific data for the user.

4. On your site, signed in

The handler then redirects to the desired page. In this example, we go right back to the page we started on, Default.aspx. This time, the cookie exists and the site is able to read account-specific information from cloud storage keyed on the unique ID of the user we received in Step 3. Instead of "Sign in please", the site now welcomes the user with a cheery "Welcome, [Name]!"

That's what will happen if the user is a return visitor to your site, but what if it's a brand new visitor? In that case you won't find anything in cloud storage keyed to the user GUID and you can take an alternative action, such as welcoming the new user and directing them to set up a profile.

That's the deal, from a page flow standpoint. All we need to do now is get into the code. In Part 2, we'll show you how to implement this for yourself.

Wednesday, December 10, 2008

Azure Cloud Computing User Group

A national user group for Azure Cloud Computing has been started, and inaugural local meetings are being held this month at Microsoft offices across the country. Local meetings will be held every month.

The community site is

Initial locations where we have secured willing hosts and a place to meet are Seattle, Los Angeles, Orange County, San Diego, Phoenix, Denver, Salt Lake City, Dallas, Chicago, Boston, New York, and Philadelphia. Manyof these areas are having their first meeting this month, all should be meeting by January.

The December meetings are introducing the platform, after that each meeting will drill into a specific area. The meeting format is pizza and introductions, a short presentation, one or more code demos, and lots of discussion.

Here's the December meeting schedule:

San Diego12/11
New York12/15
Orange County12/18

I'm the national coordinator for the user group, so if you have any questions just send mail to me either via this blog or the community site. We hope you'll join us as we explore this exciting new area together.

Thursday, December 4, 2008

Azure Step-by-Step: Hello, Cloud

I've created the first in a series of scripted step-by-step guides for Azure demo applications that give precise instructions and screen captures. The first of these, Hello Cloud, is now available for download at the link below.

Azure Step by Step: Hello, Cloud

Here's an excerpt:



Tuesday, December 2, 2008

So Cal Code Camp - Azure Sessions

The next Southern California Code Camp has been scheduled for January 24th-25th 2009 at Cal State Fullerton (Orange County). Azure will be well-represented, with sessions from Microsoft, Neudesic, and others. I'll be presenting 4 Azure cloud computing sessions:
  • Azure Cloud App Demo: Social Networking Web Site
    Forget "Hello, Cloud", it's time to see something real and substantial. See a social networking site and the code behind it that runs in the cloud, uses cloud storage, and authenticates using Windows Live ID. It's Azure cloud computing in the real world.
  • Azure Cloud Application Model
    Microsoft's Azure cloud computing platform has a new role-based application model that can scale well at every tier. Learn about the model and see it in code.
  • Azure Cloud Security
    The Azure cloud computing platform offers compelling security capabilities. Learn how to integrate Windows Live ID with your web site. Learn how to integrate and federate enterprise security with your cloud application.
  • Azure Cloud Storage
    In this session we'll explore how cloud storage works on Microsoft's Azure cloud computing platform. This includes the ability to store and recall BLOBs, queues, and tables.

Hope to see you there!