Posts Tagged ‘Downloads’

Workarround: IE11 changing download file extension to .zip

At ClipFlair Gallery, apart from opening a ClipFlair activity in ClipFlair Studio, downloading of an activity (.clipflair) file is also supported.

However, because the component serialization file format of ClipFlair Studio is XML plus media assets packed in .zip archive (with nesting allowed, where components and whole activities can be placed in other activities), Internet Explorer 11 (and probably other browsers too) was downloading .clipflair files as .zip (changing their file extension).

At first, I thought that occured because I was using MIME type “application/zip” at the IIS web server/site settings for that file extension. So then I tried to change it to “application/octet-stream” hoping that one would be treated as an “opaque” data stream.

However, eventually I ended up setting a custom MIME type “application/clipflair” for the file extension “.clipflair”, because even with “application/octet-stream” (as with the “application/zip” that I had before), IE11 was still saving the .clipflair file as .zip (obviously detecting the zip content in the download stream).

<?xml version=”1.0″?>


<directoryBrowse enabled=”true” showFlags=”Size, Extension”/>

<add value=”index.html”/>
<add value=”Default.aspx”/>
<add value=”Default.html”/>

<add extension=”.log”

<mimeMap fileExtension=”.log” mimeType=”text/plain”/>
<mimeMap fileExtension=”.clipflair” mimeType=”application/clipflair”/>
<mimeMap fileExtension=”.dzi” mimeType=”text/xml”/>
<mimeMap fileExtension=”.dzc” mimeType=”text/xml”/>
<mimeMap fileExtension=”.cxml” mimeType=”text/xml”/>


<compilation debug=”true” targetFramework=”4.0.3″/>



HowTo: Check MSDN Subscriber downloads for tampering via SHA-1 key

Supposing you have an MSDN Subscription, you could download say SQL Server 2012 Standard Edition (x86 and x64) – DVD (English) from the following URL:

Suppose you do so and you keep that .ISO file (a CD/DVD image that you can burn to a disk using Windows 7 or Active@ ISO Burner tool, or mount as a virtual disk with Daemon Tools or unpack with WinRAR etc.).

Later on before installing it you’d like to know if it has been tampered in between by some virus, or if it was tampered by some man-in-the-middle attack during the download process.

Luckily, the MSDN subscriber downloads page is accessible without even signing in with your Microsoft account credentials and has a Details link for each download item that shows an SHA-1 hash key for the file (very handy if you don’t want to use the company’s credentials on a developer machine, but just want to copy-paste the SHA-1 key from there to check it against the file you have at hand).

Speaking of SHA-1, it would be nice if Microsoft also displayed an MD5 key there too for cross-checking both of them, or even a SHA-3 key in the future, that is supposed to be more (cryptographically) secure.

To check the file against the SHA-1 key, you can use the Microsoft File Checksum Integrity Verifier (FCIV) tool, a free command line utility that computes MD5 or SHA1 cryptographic hashes for files:

FCIV installer just unpacks an fciv.exe and a ReadMe.txt file. The command-line parameters for fciv.exe are displayed if you run it from a command-line (cmd.exe or command.exe in XP) window:

// File Checksum Integrity Verifier version 2.05.
Missing flag: -xml

Usage:  fciv.exe [Commands] <Options>

Commands: ( Default -add )

        -add    <file | dir> : Compute hash and send to output (default screen).

                dir options:
                -r       : recursive.
                -type    : ex: -type *.exe.
                -exc file: list of directories that should not be computed.
                -wp      : Without full path name. ( Default store full path)
                -bp      : specify base path to remove from full path name

        -list            : List entries in the database.
        -v               : Verify hashes.
                         : Option: -bp basepath.

        -? -h -help      : Extended Help.

        -md5 | -sha1 | -both    : Specify hashtype, default md5.
        -xml db                 : Specify database format and name.

To display the MD5 hash of a file, type fciv.exe filename

Based on those, you can create an fciv.bat file, where you have something like the following:

c:\users\myself\desktop\admin\fciv.exe -both %*

This batch file (fciv.bat) runs fciv.exe (assuming it is at path c:\users\myself\desktop\admin above, change this appropriately), passing it –both parameter to generate both SHA-1 and MD5 keys (could have used –sha1 instead for more speed, since MSDN doesn’t give MD5 key for files).

It uses %* to pass all command-line parameters of the batch file to the executable fciv.exe file. This means you can then drag-drop any file onto the fciv.bat at Windows Explorer and it will run fciv.exe on it, telling it to generate both MD5 and SHA-1 keys (shown in a tabular form at the output).

Before exiting, the batch file executes pause (the @ prefix means to not display the command itself on the console – could have also used an @echo off command at the start of the batch file but want to show the fciv.exe command path being executed for troubleshooting) instead of closing the console window immediately as would happen if you drag-dropped a file on fciv.exe itself). Pressing space after you read the hash keys (can also copy-paste them from the console right-clicking it and selecting Mark command, then drag to select and press SPACE key to copy), will then close the console.

Do note that FCIV also can take other parameters, to add calculated keys to a simple XML file (serving as a database) which it can use later on to check multiple files for tampering when you tell it to.

Collection of useful links for .NET, Silverlight, WPF etc. development

During the development of ClipFlair (currently at Alpha1-internal version), I’ve been doing lots of research, hunting for information (documentation, related discussion threads, useful download links) needed when writing and refactoring source code etc.

I have tried to organize these links as (Windows) Internet shortcut files into folders. They do need some further restructuring, but they can still be a useful reference. You can download the latest version of those developer links at (will add new separate releases with enhanced/refined developer links in the future):

Also, you can find blog posts related to issues I’ve come across up to now while developing ClipFlair at (will be updating that page):

IE9 RC: Where’s that download manager?

Internet Explorer 9 (IE9) has at last introduced a nice download manager, as shown below.


This was long needed, since in IE8 there were cases were downloads with the same filename, when launched from different windows, could get corrupted. The download manager will also show resume download button when needed. IE8 could also resume downloads, but you had to use the exact download URL again for an interrupted download, which was not always easy to find, since some sites generate unique download URLs – especially those that are ad-funded and want you to visit their download page to see the ads, instead of clicking a direct download URL to get the file.

Note that the small icon with the shield that you see above on the left for “Insert Code for Windows Live Writer.msi” means IE’s SmartScreen filter has checked that file and doesn’t find some threat it knows. It is shown upon hovering over an entry’s row with the mouse.

The GUI looks simple and pretty in my opinion (much cleaner than the one in Mozilla I think), but still has some glitches, for example you can resize the columns, they get only resized automatically when you resize the window (sad to break UI behaviour that users have grown to expect thanks to Windows – do vote on this item to get fixed at

Speaking of unexpected UI behaviour (breaking the “least user surprise” rule), another annoying UI glitch is that when you press ALT+TAB at the download manager to navigate to other window, or click some other window to give focus to it (including the IE webpage window) and then bring back to front / give focus back to the download manager again, it scrolls its downloads list back to the top! Obviously it shouldn’t, however when showing the manager from the Tools/View downloads menu etc. it should still scroll to top maybe and also when invoking it from the download started/completed prompt it should scroll to show the specific download item in the list. Reported it too via Help/Send feedback menu, please vote on that too:


There are other IE9 RC GUI glitches related to the download manager too, checkout and vote my related feedback at: The issues mentioned there are:

  1. The tools menu shown with the GEARS button at the right side of the screen on the same row as the address bar looks pretty bare with no icons at all. Is this a design style? Why have the icons’ area at the left of that menu then if it is left empty?
  2. Can’t add View downloads to commands toolbar. First of all, it has no icon in command bar’s Tools menu and moreover, it’s not available at the Customize commands toolbar dialog (Right click Tools menu and select “Customize>Add-Remove commands” to show that dialog)


P.S. Notice the SEO (Search Engine Optimization) trick used at those Microsoft Connect URLs above? They have a unique ID, while at the end they also have text from the title of the entry (of course this practice can lead into ugly and long encoded URLs if the title is not in English). That allows the URL to be more obvious to humans and for search engines to better index those URLs when mentioned on other webpages. It even allows for the original article to be renamed without a problem, since you can type anything after the slash that follows the unique ID number and it still goes to the same article fine.

Categories: Posts Tags: , , ,
%d bloggers like this: