Scott Hanselman

Firefox, ClickOnce, XBAPs and .NET 3.5 SP1

September 5, '08 Comments [3] Posted in ASP.NET | BabySmash | Musings | Tools | Windows Client | WPF
Sponsored By

One of the things that I noticed immediately when I made the SmallestDotNet was that Firefox was reporting the version of the .NET Framework installed. There's a Firefox extension that is installed with .NET 3.5SP1. I was stoked about this because I'd like users of BabySmash to be able to use ClickOnce from Firefox to launch it.

ClickOnce and Firefox

When you install .NET Framework 3.5SP1, there's a key written to the registry whether Firefox is installed or not. If Firefox is installed later, it will notice the key and use the plugin. If it's already installed, it'll just work. The registry key points to a Firefox Extension (XPI) that acts like the 3rd party FFClickOnce extension that a lot of us installed before.

The registry key is at HKLM:\Software\Mozilla\Firefox\Extensions This Firefox Addin helps ClickOnce applications work from inside of Firefox 2 or Firefox 3. It'll be installed with any installation of .NET 3.5 SP1, including the smaller Client Profile.

The add-in looks like this...

Picture of the Firefox Addins dialog

And its options dialog looks like this:


On my system the Firefox UserAgent now looks like this:

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/2008070208 Firefox/3.0.1 (.NET CLR 3.5.30729)

By default, as you can see in the dialog, the browser will report just the most recent version of the .NET Framework unless you say otherwise.

What happens if the FFClickOnce extension is already installed?

In Firefox 3 the FFClickOnce add on will automatically get disabled as it has not been updated.

In Firefox 2 the FFClickOnce extension does not alter the user agent string due to a safeguard against creating a user agent greater than 128 characters.  What happens when the user clicks on a .application link is dependent on the user’s configuration.

For Firefox 2.0 this is the table of possible prompting/launching configurations.  The default for each add-on is marked in bold. 

.NET Assistant FFClickOnce Result
No Prompt Prompt FFClickOnce prompts and handles the click
No Prompt No Prompt FFClickOnce handles the click
Prompt Prompt

.NET Assistant prompts and handles the click

Prompt No Prompt

FFClickOnce handles the click

When both add-ons are in the default configuration the user will get the FFClickOnce prompt and click once activation will follow the FFClickOnce path which may bypass IE download policy.  In all cases the normal ClickOnce UI will be shown.

What this all means is that ClickOnce will work in FireFox 2 and 3, whether FFClickOnce is installed or not.

How's it done?

The plugin is written with standard XUL (pronounced zoo-el) via XML and JS.

As an aside, I think it's cool that the XML namespace for XUL is:

You can go find the plugin yourself in:

C:\Windows\Microsoft.NET\Framework\v3.5\Windows Presentation Foundation\DotNetAssistantExtension

It's a .jar file, and you can copy it out and rename it .zip and open it up. The basic gist is that the plugin watches for a particular MIMEType and application, and if it matches, it launches the ClickOnce application using the the .NET Framework's PresentationHost.exe.

isClickOnce: function()
var mimeInfo = dialog.mLauncher.MIMEInfo;

// Checking the file extension may be second guessing the webserver
// but when 'prompt' is set the user will still have a save button.
if (mimeInfo.MIMEType == "application/x-ms-application" ||
mimeInfo.primaryExtension == "application")
return true;

return false;

launch_application: function()
this.execute(this.getSystem32Dir() + \\PresentationHost.exe,
"-LaunchApplication " + dialog.mLauncher.source.spec);


It's not too complex, and it's sure nice that BabySmash users can use ClickOnce to launch the smash.


XBAPs, or XAML Browser Applications are also enabled in Firefox in .NET 3.5 using the standard NPAPI browser plugin API. The NPWPF.dll enables XBAPs under Firefox.

Image of the NPWPF.dll that enables XBAPs

XBAPs are WPF applications that run inside the Browser's Chrome. They're good for Intranet applications where you want really easy deployment, the complete .NET Framework (as opposed to Silverlight) and a browser's navigational model.

If you type in about:plugins in Firefox, you can get a list, including this one:

The about:plugins page in Firefox 

Notice the MIME Types that this plugin has registered for and the extensions (suffixes) it handles. Each of these plugins are automatically installed and enabled when you install the .NET Framework 3.5SP1, so you can count on them.

Thanks to Eric Harding, Troy Martez and Jennifer Lee for helping me pull this information together. They're going to be adding more content to the Windows Client website very soon with more details how for developers to package and use the .NET Client Profile. They'll also be releasing lots of documentation and details on ClickOnce and deployment improvements in the framework. I'll point you to everything I can dig up, Dear Reader, as soon as I can.

Related Links

Technorati Tags: ,

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Family Calendar Management - Sharing Life between Outlook and Web Calendars and the Magic of iCalendar

September 5, '08 Comments [7] Posted in Musings | Tools
Sponsored By

Recently while talking to a friend I said something like "Oh, yes, my wife send me a meeting request for that." My friend was shocked. "How did you get your wife to send you Outlook Invites?" they said.

I was surprised they thought it was a big deal that we might manage our lives and appointments the same way a business runs their meetings. Why manage one's calendar with attention and detail at work, the use a Post-It Note or a Dry Erase board at home? Each to his or her own, to be sure, but ultimately find a system that works for you.

Don't give me the standard "Wow, that's a lot of work to set this up" comments. This took all of 10 minutes to do, I'm just being extra detailed for those who like their instructions along with pictures, clear steps and a little philosophy and history.

Here's what works for us and how we set it up. I talked about it in Podcast 58 on Synchronizing Your Internet Calendars.

Basics in a Nutshell

This is the setup my wife and I have. I sync portions* of my calendar with a web calendar. Each of us can see each other's calendars as she subscribes to that calendar. My Outlook is my work email address, and I also have my personal email. She can send me Meeting Invites to either account. When I accept them, they'll show up in both places.

Diagram showing how my calendars sync

On Calendar Sharing

I'm using Outlook and The Wife is using Google Calendar, so this post uses those two products as an example. That's useful because they are both very common, and the combination is common. Also, it's nice to see Microsoft Products working with non-Microsoft Products using Open Standards.

However, the most important philosophical point to get from this section is that whatever service you are using, make sure you pick one that allows you to have control over your data and how it's published. Data Portability is important. You want to make sure you can get your data in and out of your chosen store. Preferably that'll be using a format like iCalendar (RFC 2445). Just knowing that the standard exists is empowering, because now you know what to look for.

Sharing (Publishing) in Outlook 2007

In Outlook, there's two kinds of Calendar "sharing." There's Sharing and Publishing, in fact. Sharing in Outlook language means to Share your Calendar internally to your company's Exchange Server, while Publishing means to send your Calendar out to the Internet. By default this means to, but it can mean elsewhere.

TIP: I put my Free Busy info at which just redirects to the Office site. This makes it easy for others to schedule meetings with me without giving away personal information or calendar details. I just publish free/busy time.


You CAN, if you like, publish your calendar out to the Internet as an ICS file, also called a "webcal" and then have other calendars pull from that. However, I prefer to have more control over what I publish, as I've got work meetings and things I may not want out of my Outlook.

SyncMyCal or Google Calendar Sync

I want to part (or all) of my calendar into my wife's calendar. She uses Google Calendar, and I've got a Google Calendar using my personal email address.

In order to get my appointments into Google Calendar, I prefer to use SyncMyCal software (I paid $25 for it). There is another free tool from Google called Google Calendar Sync but it's VERY basic. I prefer SyncMyCal (enough to pay for it). It's an addin that runs inside of Outlook and it supports multiple calendars, can sync a specific Outlook category (like just Personal events), does date-range-filters, and will sync Contacts if you like.

Public Calendars and Subscribing to Calendars in Outlook

There's lots of sites that have lists of events and calendars. The best of them, like include webcal/iCal/xCal feeds for all the events. Most personal web-based calendaring systems like Google Calendar (and my wife's calendar) have URLs that you can subscribe to.


For example, the Subscribe button on the Upcoming site includes an iCal option. These URLs look like:


Even though they have webcal:// at the beginning, they are still serving the calendars over HTTP. However, the webcal:// "psuedo-protocol" is a hacky way to get something to happen when you click on it. Because I have Outlook installed, clicking that iCal link gets me this dialog:

Microsoft Office Outlook

Clicking yes adds a new calendar to Outlook in "Other Calendars."


This is how I add all sorts of calendars into Outlook. I've got Team Calendars from Sharepoint, Calendars from our Intranet, as well as the wife's.Any calendar can be viewed side-by-side with the main.

Picture of my Outlook Calendar side-by-side with another

Or, I can overlay them. This is really useful for viewing The Wife's calendar and finding time where we can both free. The secondary calendar appears "ghosted" and overlaid over the primary. You can even show multiple (6, 7, etc) calendars and easily find time for meetings amongst your teammates.

Picture of my Outlook Calendar overlaid with another

Consuming Web Calendars from inside Google Calendar

If you've got a calendar "in the cloud" with a URL to an ICS, it's easy to add them to Google Calendar. In Calendar click "Add" under Other Calendars and click "Add By Url":


This is where you'd paste in the iCal URL for the calendar you're trying to consume. The wife does this with public calendars. For family there's a faster way. Just click on your calendar and click "share this calendar" and Google takes care of the rest.

IMPORTANT NOTE and CYA DISCLAIMER: It's ironic that while I've been using various plugins for Outlook Calendar synchronization for the last four+ years and never lost a thing, this week while on a trip (and while writing this post) I lost (almost) all my future appointments. Because I'm using SyncMyCal along with three different other experimental plugins, not to mention syncing with Mobile Devices, my gut says it's not SyncMyCal. However, this near-data loss is an important reminder that there's always a chance you can lose something important when you're using any synchronization software that syncs deletes. 

I got my data back by going to another machine I had with Outlook on it, launched Outlook and immediately put it into Offline mode so the deletes from the server wouldn't come down. I exported that range of missing appointments from that machine and imported them to another. The final calendar was then updated in Exchange. Crisis averted, but it was a scary time. If you lose your data, I can't help you. Be careful.

* filtering out private/sensitive/NDA work meetings via categories

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Skyping the Wife: Foolproof Video Conferencing with Your Family While on the Road

September 5, '08 Comments [9] Posted in Musings | Remote Work | Speaking | Tools
Sponsored By

I really like presenting and traveling around and meeting people, but I just hate being away from my kids. It's visceral. It's physically painful. I bring them whenever I can, but during this last trip to New Zealand and Australia it wasn't possible and I was away for 8 days. Almost killed me.

Since I work from home, when I need to talk to folks in Redmond I use Office Communicator, sometimes ooVoo if we need to talk to multiple people, or sometimes a Roundtable. Roundtables are cool because you get a full 360 degree view of the room.


Using Video Conferencing has become totally fundamental to my work life, and when I travel (a few days a month) it's utterly indispensable.

I've traveled a few times and tried to call the wife via Video Conferencing and had an utter failure. We've had trouble with her figuring out how to answer the call, how to run the app, login, deal with odd dialogs, updates, and all the general gremlins that can potentially take what is supposed to be a great experience and turn it into long-distance tech-support. Nothing lowers the WAF (Wife Acceptance Factor) like telling your wife to crawl under the computer desk and check the microphone cables.

I watched literally three different technical speakers try to get video conferencing work while in the speaker room on this last trip. One succeeded. All the others got themselves into situations where the spouse could IM, but not hear, or hear but not see, or whatever. "Can you hear me now?"

Foolproof Familial Video Conferencing

After a half-dozen failures I finally got smart. Here's what I ended up doing to make it easy. This has worked for my wife and I nine out of ten times (once there were connectivity problems at the hotel) and it's worked from Europe to the South Pacific.

Step 1 - Hardware

Get a good camera. I recommend the LifeCam VX- or NX- series. The VX-7000 is nice and simple for home. It has a good microphone built-in and the camera will do 640x480 at 20+fps easily.I use the NX-6000 for my laptop.

Step 2 - Software

Download Skype (or ooVoo or Live Messenger). You'll need two accounts, one for you (the techie) and one for your spouse. Personally I recommend a dedicated account for trips for your spouse. Something with a username like "ScottIsTraveling."

Step 3 - Preparation before you travel

Before you travel, declare one machine in the house that video conferencing machine. Log the spouse into the special travel account. Add your account as a Contact to the special travel account. That means that the special account will have only one friend - you. This is important.

Next, go into Options (I use Skype as an example, but hopefully other apps have similar options) and into Privacy. Set the options such that these are true:

"Only allow people who are in my contact list to contact me"


"Automatically answer calls from people who are in my Contact List"

and finally, and most importantly:

"Automatically Send Video"

These are the magic three options. With this setup, your spouse will have one contact, you, and when you call it will be auto-answered and the video will start.

Then I leave the account logged in and I check the video camera and microphone before I go.


This allows me to call the house and have video start without the wife even touching the machine. Daddy can show up on the computer and say "Hi! It's me, is anyone there!?" My son can run it and start talking to me, even without Mommy's help.

One last tip, try to use whatever the highest resolution your camera, bandwidth, and software supports. I was able to get near-DVD quality (640x480) this last trip and was thrilled with the quality. Video conferencing has come a long way since my first black-and-white Logitech QuickCam.

Next time you're traveling I encourage you to try this out and see how it goes. This trip I was able to have chats with the family every night with no glitches or troubles. It almost made the time away tolerable.

Technorati Tags: ,,

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Windows Live Mesh, Silverlight and the CoreCLR

September 5, '08 Comments [8] Posted in Silverlight | Windows Client | WPF
Sponsored By

Picture the files in the Live Mesh folder Disclaimer: Everything in this post is pure conjecture by me, done by simply poking around my system and talking to myself. I don't work for the Live Mesh team, nor do I know anyone on the team. Anyone could have written this.

I was talking to Harry recently and we went poking around in the folder that the Windows Live Mesh client is in. On my machine it's in "C:\Users\scottha\AppData\Local\Microsoft\Live Mesh\"

There's a lot of interesting stuff in there. There's a version of System.Core (LINQ) as well as System.ServiceModel (WCF), but most interestingly there's coreclr.dll. Where have I seen that before? I've seen it in C:\Program Files (x86)\Microsoft Silverlight, of course. It's the Silverlight CLR that you might have on your own system. Remember this isn't the complete CLR, but rather a pared-down more portable version. This makes sense since Mesh plans to do a Mac client and Silverlight runs on Intel Macs.

It's a different version, though. On my machine I've got Silverlight 2 Beta 2 and its digital signature for coreclr.dll is recent while the Mesh coreclr.dll is version 1.1 and from February. That was back before the Mix '08 conference Silverlight 1.1 was re-christened "2.0."

You can see more of the MOE (Mesh Operating Environment) external dependences in the "Moe.exe.managed_manifest" XML file. It appears they've got their own private build of the a tiny CLR and just the libraries they need to make it work.

Even though Silverlight is a Rich Internet Application (RIA) technology and meant for use as a browser plugin, this is the third time I've found Silverlight living outside the browser (although still doing "connected" work).

The first time was when Jamie Cansdale, the author of TestDriven.NET prototyped running Unit Tests with the CoreCLR/Silverlight.

The second time, was the Mac Times Reader. You might have seen the NYTimes Reader, and the News Reader SDK. The Times Reader is a XAML-based WPF application. However, there is a scaled-down version of the Times Reader that was released on the Mac and it uses Silverlight to render XAML. In that application Silverlight is being hosted inside of a Cocoa "chrome" shell application using some MacGyver magic. It appears a lot of custom work was done to render the Reader-specific news feed (it's more than just RSS) in a flow layout.

All of this stuff Mesh is doing struck Harry and I as very interesting. It'd be cool if ISVs could target the CoreCLR (Silverlight) for some scenarios and have their own xcopy deployed private-version of .NET like Mesh. It appears Mesh used this custom version of the CLR so it would have portability between platforms.

It's always interesting to see how other groups at Microsoft do stuff. Just like us (the community), other divisions that use things the Developer Division produces, although since they are on the inside they get to do some magical things since they can just walk down the hall. (I work in my home office, so I'm pretty much limited to Office Communicator or I have to ask Phil to walk down the hall for me.)

I'm going to ask around and find out the full story behind how the Mesh (Beta) Windows Client uses .NET, and maybe I can get one of the more technical folks to do a podcast.

Technorati Tags: ,,

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

The Case of the Failing Disk Drive or Windows Home Server Saved My Marriage

August 27, '08 Comments [37] Posted in Home Server | Musings | Tools
Sponsored By

Photo of my Home Server on a shelf in my office I bought an HP MediaSmart Windows Home Server last Christmas, and haven't thought much about it since. It sits on the shelf and is pretty.

Actually, that's not totally true, I did upgrade it to Power Pack 1 recently, but that was a 10 minute thing. For the most part, it's a conversation piece on a shelf in my new(ish) home office.

Now, the story. I sold my wife's laptop to Shawn recently as she wasn't laptop-ing much and wanted the speed of a desktop. I gave her my old Developer Rig with 32-bit Vista SP1 and she's cool with her browsing and her wifely blog and what-not.

A few weeks later she comes to me and we have a conversation that went (something like):

"This computer sucks. It's freaking out and now it says something about being smart. Let me tell you, mister, it's not smart."

What do you mean smart? Oh, wait, do you mean S.M.A.R.T.?

Smart, dumb, whatever, it's not booting. Let's get a Dell! Are my files backed-up?

Photo of the front of my computer case with the Floppy Drive pushed in oddly.Ok, wait a second. I go upstairs and I see this. I'm like, that's weird. The floppy drive is pushed in. That's odd. Whatever. I blow it off.

I go into my stash and pull out a hard drive. It's a 160gig that will replace the 80gig in her machine.

I open it up (it's a tool-less case) and swap out the drive. I can't find my Windows Home Server Restore CD so on my other machine I go to \\server\software\Home PC Restore CD and there's a readme.txt file that says:

"If there is a CD image file (RestoreCD.iso) in this folder, it is outdated.

To create a Home Computer Restore CD, download the ISO image file (RestoreCD.iso) from the Microsoft Web site at"

Cool, looks like the Power Pack 1 needs a new Restore CD. I download it and use the best image burning software out there, ImgBurn and I'm on my way.

I boot off the CD and get a nice Windows-looking interface and a wizard. It finds my Home Server, prompts me for a password and somehow automatically (probably via IP or Mac Address or some magic computer hash?) figures out which computer I'm trying to Restore. It automatically selects WifelyPC out of the list of a half-dozen machines in the house. I hit Finish and it takes like 11 minutes (creepy fast) to restore.

Boom. It's back. Total time elapsed, with drive swap, ISO download and burn was like 35 minutes. If I'd downloaded the ISO back when I got PP1 like I should have, it would have been a 15 minute operation. It was like using Norton Ghost in the old days, except without the DOS driver disk, the network goo, and general hassle. Couldn't have been easier except if there were no buttons to push at all.

Problem solved, and I'm the hero. The next two days involve me fitting this into casual conversation:

"Did I mention I brought your computer back from the abyss? Seriously. It's like Tivo. I just put it back the way it was at 2am on Tues. Isn't that cool? Love me!"

Something like that. I think the Love Me part was implied.

Fast forward to today.

"I'm sick of this freaking computer. It's clanking."

Uh oh. Clanking is rarely good. Actually, never good.

"I want a Dell. Uncle Ronnie got a Dell, where's my Dell?"

I return to my wife's office and see this after opening the side of the case:

Photo of the open side of my Computer Case with the Floppy casing falling on my hard drive

Not clear? Let me add some John Madden commentary:

Photo of the open side of my Computer Case with the Floppy casing falling on my hard drive with arrows and the word SMASH in red.

Picture of the 2 yr oldSame thing as before, except this time my brain is working. It seems that the 2 yr old, pictured here, the face of pure evil, pushed on the front of the floppy drive. (Yes, I have a floppy. No, I don't know why. It's vestigial, OK?)

The floppy drive is set in a larger "shell casing" that should have been screwed and secured into the larger case. Was it? Of course not. I'm a putz.

Of course I totally blamed the child. He can take it.*

Shoot, so that's two dead hard drives. But! The Home Server had taken it's nightly snapshot, again, after I'd restored it the first time. This included any changes The Wife had made the the machine in the last two days.

In fact, since I've upgraded my original 1TB Home Server with two extra drives, I've got backups going back into July. 

Home Server dialog showing a list of backups for my wife's computer

The backup management is set by default to keep 3 months of monthly backups, 3 weeks of weekly and 3 days of daily. That's pretty good coverage.

If you look at the very first picture, you'll see an external Western Digital MyBook that backs up the Home Server itself. I'm also a Mozy user, but it doesn't support Home Server, so I'm considering using KeepVault's specialized Home Server Product for Cloud Backup.

It's good to have a Backup Strategy. What's yours?

 Network Diagram of the Hanselman Backup Strategy

I'm happy with the Home Server and definitely recommend it.

Related Posts

* Don't worry, my wife saw right through it and now I'm in trouble for trying to pin this rap on the cherub. Look at that face!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.