Welcome to MSDN Blogs Sign in | Join | Help

Right before the holidays, I saw down with Marc Mercuri to discuss the recently released Tafiti Windows Live Quick Application and how it evolved from one of Marc’s recent incubation projects. The interview just went live this morning on Channel9; you can find it here.

In the interview, Marc describes the journey from Tafiti, the incubation project, to the Tafiti Quick App. In case you're not familiar with Tafiti or the Quick Apps:

  • Tafiti is an experimental search front-end from Microsoft that uses Silverlight and Live Search to provide a rich specialized search experience on the Web. 
  • The Windows Live Quick Applications are a set of samples that illustrate how to combine multiple Windows Live platform offerings to implement specific Web scenarios. Each Quick App is offered as a source code download, and you can use the code as-is, you can re-purpose it, copy code snippets from it, or use it as a learning tool.

Big thanks to Angus Logan who drove this effort, working with Marc and others to convert the incubation project into a Quick App.  Angus announced the release of the Quick App in this blog entry. (In case you didn't already know, Angus's blog is one of the best sources of information for what's happening in the Windows Live space for developers).

If you're inspired by Tafiti, and have interesting ideas for other specialized search experiences, be sure to listen to the part of the interview where Marc announces a contest (00:26:44). (Or just read the last paragraph of the video description on Channel9 :-)

I'm really excited about participating in the upcoming ReMIX event in Boston. I'm especially fond of Boston, as I lived there during most of the '80s. (I first moved there to attend New England Conservatory as a violin major. I ended up quitting violin, but I moved next door - literally! - to Northeastern University, where I graduated with a double major in Computer Science and Math. Lots of great memories!)

Anyway, I'll be presenting two sessions on the Windows Live Platform. In the first session, Exploring User Experiences Built on the Windows Live Platform, I'll run through examples of sites that are built on Windows Live Platform offerings. In the second session, Lap Around the Windows Live Platform, I'll walk through the specific APIs and controls.

 

For more info on the conference, check out http://www.remix07boston.com. And be sure to check out the discount code posted by Bob in this blog entry. 

Hope to see you there!

image

Windows Live ID Web Authentication

By now, I hope you've heard about the recent release of Windows Live ID Web Authentication.

If you haven't, here are some links you should check out:

Test driving the ASP.NET sample

I finally got around to giving it a test drive myself, using the ASP.NET sample included in the Windows Live ID Web Authentication SDK, and wanted to share my experience with you.

Let me first share with you one of my pet peeves regarding web development: I DO NOT want to install a web server on my client machine. I don't have anything against web servers, it's just that I don't want the hassle of installing, running and managing a web server on my laptop when all I want to do is some straight-forward web app development. That's why I love the built-in ASP.NET Development Server that was introduced in VS 2005, and I actively advocate the need for our development scenarios to work in this environment.

The ASP.NET sample assumes you have IIS installed, so there were a couple of things I needed to do before I could run it from the ASP.NET Development Server.

Some background on Windows Live ID Web Authentication that is relevant to the steps I'll outline below:

  • Users will sign in/out of Windows Live ID on your site via a link you provide to the Windows Live ID Authentication service; you need to provide an AppID in the query string (see Displaying the Sign-In Link for details)
  • An AppID is obtained by registering your application and providing (among other things) a "Return URL" to which the service redirects users after they have successfully signed in/out (see Getting Your Application ID for Web Authentication). 
  • The Return URL points to a page on your web site that handles login/logout actions (see Handling the Response from the Service). I'll refer to this page as the "web-auth handler".
  • To change the URL of your web-auth handler, you need to update the registration values associated with the AppID (or create a new AppID, if you don't own the existing AppID - as is the case with the sample)

Creating a file system-based Web Site for the ASP.NET sample

Since I don't have IIS installed, the steps for setting up the sample differ than the ones described in the SDK docs.

Here's what I did to set up a file system-based web site for the sample:

  1. Ran the ASP.NET sample installation file (webauth.msi), which you'll find here
  2. Using Visual Studio, I created an Empty Web Site and named it WebAuth.
  3. Copied the contents of the C:\Program Files\Windows Live ID\WebAuth\Sample folder to the WebAuth folder created for the web site
  4. Copied the C:\Program Files\Windows Live ID\WebAuth\App_Code folder to the WebAuth folder
  5. Refreshed the web site project in VS (right click on the site in the Solution Explorer and select Refresh Folder)

Running the ASP.NET sample using the ASP.NET Development Server

The AppID used by the sample is configured to redirect the user to the following path: http://localhost/webauth/sample/webauth-handler.aspx. This path won't work if you're app is running under the ASP.NET Development Server, because it's not listening on port 80 - it uses a randomly selected port. So I created a new AppID and modified the sample to work with this new ID. I did this in three steps.

Step #1: Determined the port being used by the ASP.NET Development Server

I ran the web app from VS and noted the port number displayed by the ASP.NET Development Server icon in the system tray. [If you hover over the icon - the one pointed to by the arrow in the image below - you'll see the port number at the end of the description text]. 

 ASP.NET Dev Server System Tray Icon

(There's a doc that describes how to configure it to use a specific port - How to: Specify a Port for the ASP.NET Development Server - but I found that the server seems to use the same port for a given app).

Step #2: Created a new AppID

I followed the steps outlined in Getting Your Application ID for Web Authentication to create a new AppID. 

  • Application Name - you can use any value here; I used WebAuthSampleApp
  • Return URL - I included the port on which the ASP.NET Development Server was listening (as determined in Step #1). Since I created a file system-based Web Site called WebAuth, and the server was listening on port 61343, it looked like this: http://localhost:61343/WebAuth/webauth-handler.aspx
  • Secret Key - to minimize changes to the sample app, I specified the value used by the sample: ApplicationKey123

Step #3: Modified Web.config

The sample is reading the AppID and Secret Key values from the web.config file. I found the following line, and replaced the wll_appid key's value with my newly created AppID.

<add key="wll_appid" value="0016BFFD80002719"/>

That did it - from there, I just pressed F5 and ran the sample application under the ASP.NET Development Server.

I was out of the office last week on vacation (check out our awesome seaplane ride to Victoria!), and a number of things were released that I want to be sure and call out.

New release of the Windows Live Contacts control. You can read about the new incremental search and filtering features on Danny Thorpe's blog here.

Referencing Spaces Photos. Joe Healy posted a blog entry on how to reference Windows Live Spaces photos from HTML img tags, and John Bruno added some additional information in this post.

Note that there's yet another way to get the URL of a Spaces photo (although the URL is much uglier than the one returned by the RSS feeds): right click on a photo in the Photo Gadget, select Properties and copy the URL. But I must admit that I've recently switched over to Joe's approach of using the URL in the album RSS feed. 

Windows Live video segments On10. Before leaving for vacation, I worked with the On10 team on a series of end-user targeted videos on Windows Live. The first three were released last week:

And more were released this week:

Windows Live SkyDrive updates: new name (used to be Windows Live Folders), new features, and availability in new regions! You can read about it here, on the SkyDrive's team blog. 

With a recent update to the Silverlight Streaming service, it's now even easier to instantiate a hosted app on a web page: all you need is a single iframe element whose source attribute refers to a server-side invocation URL. You can now write something like this:

<html>
<body>
   <
iframe src=http://silverlight.services.live.com/invoke/AccountID/AppName/iframe.html

     scrolling="no" frameborder="0" width="500" height="400"></iframe>
</body>
</
html
>

(Note that AccountID and AppName need to be replaced with values specific to the hosted application)

Background

Silverlight Streaming is a new Windows Live Platform offering (currently in alpha) that provides scalability-on-demand for media-rich Silverlight applications. (You can find more information here)

Once you upload a Silverlight application to the Silverlight Streaming service, it's fairly trivial to instantiate the hosted app on a web page. You could previously do it in four easy steps that look something like this: 

<html>
<
head>

<!-- (1) add a script reference -->
   <script src="http://agappdom.net/g/silverlight.js" type="text/javascript"></script
>

<!-- (2) define a Javascript function to create the hosted object; usually in a separate .js file -->
   <script type="text/javascript">
      function CreateSilverlight() {
         Sys.Silverlight.createHostedObjectEx({ source: "streaming:/AccountID/AppName",

         parentElement: pe});
      }
   </script
>
</
head
>
<
body
>
<!-- (3) define a DIV to contain the hosted object -->
   <div id="myApp" class
="aghost">
<!-- (4) add a script element to call the create function -->
      <script type="text/javascript">

         var pe = document.getElementById("myApp");
         CreateSilverlight();
      </script
>   
   </div>
</
body
>
</
html
>

[Details on the individual steps can be found here, on the Windows Live Dev site. Note that the URL used in step (1) is for the Silverlight 1.0 Beta. For more information on how to reference Silverlight 1.0 RC, see the July 27th entry on the Silverlight Streaming News page]

Looks like I missed this announcement while I was away on my recent ReMIX Europe tour (more on that in a future post). I wanted to call it out anyway, just in case you, too, may have missed it.

11.5 terabytes of new data! Including...

  • Lots of new 3D imagery for many cities in the U.S. and Canada
  • New Bird's eye coverage for many European cities (including the following cities in Spain: Ávila, Burgos, Gijón, Lugo, Ourense, Salamanca, Segovia, Vigo, Ponferrada, Zamora, Palencia, Ciudad Real, Pontevedra, Santander, Girona, Torrelavega, Valladolid, Castellón de la Plana, Elda, Fuengirola, Granada, Mijas, Murcia, Vélez-Málaga - but still no imagery for Madrid or Barcelona :-( 

You can read the details on the VE team blog: Virtual Earth updated with new Birds Eye and Aerial Imagery.

Yesterday we released this Channel9 interview with Koji Kato and Danny Thorpe from the Windows Live platform team. Koji and Danny share their views on Internet software development and evolving Windows Live into a platform.

This was my first time behind the camera - I'm a video newbie, so it's a bit shaky at the beginning (I think I actually kicked the tripod at one point) and the microphone was a bit too close to me. Oh well, lessons learned for future interviews. :-)

I'm planning a whole series of interviews focusing on Windows Live technologies, so stay tuned!

Apologies for "going dark". I had to put everything on hold for about a month to deal with the aftermath of the big windstorm we had back on Dec. 14th (you can read about it here on my personal blog, if you're interested), and it's taken me another month to catch up at work.  

And now that Windows Vista has shipped, I've moved on to Windows Live services evangelism.

You can still expect more posts on Windows Vista; over time, the focus will be more on Windows Live services. Just so you know, I'm starting off with a "blank slate" and there's a lot I need to learn to get up to speed. I'll be describing my journey as I go along - so I hope you'll want to come along for the ride :-) 

ISearchQueryHelper is a COM interface that can be used to convert from Advanced Query Syntax (AQS) to a SQL query that can be passed to the OLE DB Provider for Windows Search. (For background, see my previous post: Advanced Query Syntax: What, Where, Why, and How)

Good news for managed code developers - there's a type library from which you can create an interop assembly (using the tlbimp.exe tool). You'll find the type library (it's called SearchAPI.tlb) in the Lib folder of the Windows SDK. 

Once you've generated an interop assembly and have added a reference to it from your managed code project, here are the necessary steps to convert from AQS to SQL syntax:

  1. Instantiate the Search Manager
  2. Get the catalog manager for the system index
  3. Query the catalog manager for its corresponding query helper
  4. Convert an AQS string to a SQL query string

Here's some C# code that shows how to convert an AQS string to a SQL query string (the code fragment assumes that aqsQuery is a string variable that contains an AQS query):

using SearchAPILib;

...

CSearchManager manager = new CSearchManagerClass();
CSearchCatalogManager catalogManager = manager.GetCatalog("SystemIndex");
CSearchQueryHelper queryHelper = catalogManager.GetQueryHelper();

string sqlQuery = queryHelper.GenerateSQLFromUserQuery(aqsQuery); 

What is Advanced Query Syntax and where is it used?

Advanced Query Syntax (AQS) is a syntax that enables end-users to define targeted search queries, and is supported in a number of Microsoft products (for example: Windows Vista, Outlook 2007, and Windows Desktop Search). 

Here is an example of a search query defined using AQS that will return all the email items, sent by me today, that include the word "Vista".  

Vista author:catherine kind:email sent:today

For information on the specifics of the syntax, check out the documentation on MSDN.

Why should I care about AQS?

As a user (and developers are users too :-), AQS can help you find things faster on products that support AQS. For example, on Windows Vista with Outlook 2007, I can enter the above query directly in the Start menu's instant search box!

As a developer, if you're using the OLE DB Provider for Windows Search to run user-specified queries, you may want to consider supporting AQS. 

How do I support AQS in my application?

There's no need to parse AQS yourself, just use the ISearchQueryHelper interface. This interface has a method called GenerateSQLFromUserQuery that converts AQS to a SQL query that can be sent to the OLE DB Provider for Windows Search.

In a recent post, I listed a number of methods for embedding manifests in managed assemblies. As I mention in that post, my preferred option is to call the mt.exe tool during a custom post-build step. But I recently found that this doesn't work so well for VC++ projects, as it overwrites the manifest that may have been added during the VC++ build process. (Not good, since VC++ applications also commonly use manifests for defining other settings - like side-by-side assemblies).

Last week I learned that, for VC++ 2005 projects, all you have to do is add the manifest file to the project and VC++ does the rest! (Just make sure the manifest file ends with a .manifest extension). And this works for both native and managed C++ apps. (Thank you Boris, for pointing this out to me!)

I recently learned some new things about the Search APIs in Windows Vista, including some great improvements in the SQL syntax for the OLE DB Provider for Windows Search. (Thank you Chris McConnell - Architect on the Search team - for driving these changes, and for taking the time to explain them to me!).

There've been some simplifications in the syntax that happen to address a couple of things I found to be a bit odd and cumbersome:

  • System property names no longer require double quotes. Recall that the column names specified in the SELECT statement must be properties from the Windows Vista property system; and since the naming convention for properties includes dots (System.Application.Property), property names had to be delimited with double quotes. The double quotes are no longer necessary for system-defined properties (the ones that begin with System.)
  • ..SCOPE() no longer required in FROM statement. There is only a single catalog that can be searched on the desktop - and since scope is actually defined using the "Scope=" predicate in the WHERE clause - you no longer need to add that funky "..SCOPE()" stuff at the end of the FROM clause.

So, a query like this:

SELECT "System.ItemName", "System.ItemUrl" FROM SYSTEMINDEX..SCOPE()

can now be written like this:

SELECT System.ItemName, System.ItemUrl FROM SYSTEMINDEX

Much better, isn't it?

(Note that these changes reflect added flexibility, and won't break any existing queries)

I'm leaving tomorrow for Spain, where I'll be presenting a couple of sessions next week at TechEd Europe in Barcelona.  Yes I know, TechEd doesn't start until Monday (for the pre-conference activities), but this way I can spend the weekend in Madrid with my family. (You probably wouldn't guess from my name that I'm half Spanish. :-). I should be over the effects of jet lag by the time TechEd starts, as well.

I'll be presenting an updated version of the session I delivered at TechEd Boston and on the EMEA Windows Vista and IE7 Readiness Tour last month: DEV325 Windows Vista: Tips & Tricks for Targeting Key Native Application Program Interfaces (APIs) from Managed Code (Wed Nov 8 17:00 - 18:15) (see my previous post Tips & Tricks for Going Native on Windows Vista for the details).

I'll also be doing a whiteboard discussion session around some of the new user experiences in Windows Vista and how your applications can provide similar behaviors (with more of a focus on native APIs than on the .NET Fx 3.0): DEVWD30 Top-10 Ways to Light-Up on Windows Vista (Thu Nov 9 10:45 - 12:00)

If you're going to be at TechEd Barcelona and are interested in learning more about Windows Vista, I hope you'll come to one of my sessions and/or stop by and chat during one of my shifts at the Ask The Expert booth or the Windows Vista for Developers booth.

Hasta la vista - nos vemos en Barcelona!

I'm thrilled to report that Jeff Chrisope has finally resumed blogging! Jeff is leading the development efforts for the Vista Bridge samples. 

What are the Vista Bridge samples? The Vista Bridge samples are a set of samples that ship with the Windows SDK. These samples illustrate techniques for interoping with Windows Vista native APIs, and for designing managed wrappers that expose a more .NET style of API.

Why should you care about the Vista Bridge samples? If you're developing applications for Windows Vista with managed code, these samples can save you a lot of time. Currently available versions of the samples include managed wrappers for the new Open/Save File dialogs and for Task Dialogs.  And Jeff and Yves Dolce are currently working on wrapping additional APIs. Keep an eye on Jeff's and Yves's blogs to get the inside scoop.

Windows Desktop Search (WDS) 3.0 has been released to the web. You can download it from one of the following links (depending on your OS version):

Why doesn't Windows Vista appear in this list? Because the stuff that ships in WDS 3.0 is already built-in to Windows Vista - there's no need to install it. 

So if you're targeting Windows Vista (which I hope you are :-), why should you care? You can think of WDS 3.0 as a "redistributable" for the Windows Vista "Visualize, Search & Organize" features that go down-level (e.g. the indexing platform, the property system, the OLE DB Provider for Windows Search). This enables you to target these features and still run on Windows XP, with the addition of WDS 3.0. Examples of applications that do this are Outlook 2007 and OneNote 2007. 

More Posts Next page »
 
Page view tracker