james mckay dot net
because there are few things that are less logical than business logic

Windows upgrades break Media Player 6.4

One of the systems that we have developed serves up WMA files dynamically and plays them in an embedded Windows Media Player. Because this system has been around for a few years now, it still uses the old classID for Windows Media Player 6.4 rather than the newer one for versions 7-11. That was all very well: this works fine with the later versions, it doesn’t have to do anything particularly fancy, and besides, it did the job admirably well.

Until Microsoft rolled out their latest set of Windows updates this week, that is. All of a sudden, users were reporting that Internet Explorer was crashing all over the place. However, if they rolled back to IE6, everything worked fine.

It turned out that we were serving up some of our sound files with a content type of “application/octet-stream” rather than with the expected “audio/x-ms-wma”. This was fair enough: Postel’s Law says that you should be liberal in what you accept, but conservative in what you do. So even if we weren’t getting it quite right, Windows Media Player was forgiving us.

Unfortunately, on Patch Tuesday, Postel’s Law went out the window at Microsoft’s end as well as ours. And rather rudely, to boot. No “invalid content type” messages or anything: Internet Explorer would just freeze.

To fix the problem, you need to do one of the following (preferably all three, despite the fact that there may be certain logistical issues with the third):

  1. Make sure you are serving up the correct MIME type with your media files. For WMA audio files it should be “audio/x-ms-wma”. For other media types see here.
  2. Change your web pages to use the newer class ID for Windows Media Player. It should be 6BF52A52-394A-11D3-B153-00C04F79FAA6 rather than 22D6F312-B0F6-11D0-94AB-0080C74C7E95. Note that some properties change names between versions: in particular, you use “url” rather than “src” in the later version.
  3. Tell your users to jettison Internet Explorer altogether and switch to Firefox or Safari.

Talking of point 3: can someone please explain why the Windows Media Player Firefox Plugin doesn’t install on Windows Server 2003? Windows Server 2003 is just supposed to be Windows XP on steroids with a bunch of configuration tweaks and extra bells and whistles and an inflated price tag, surely? Or is there some genuine good technical reason for this seemingly inexplicable design decision?