We had this very bizarre issue today, where attempting to download zip files from Windows 2003 Server. Using Firefox, the file could be opened successfully, but Internet Explorer displayed one of the following errors:

Internet Explorer cannot download [file] from [server]. Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.

– or –

The Compressed (zipped) Folder is invalid or corrupted.

The zip file was definitely not corrupted. It could be opened using different zip applications, on different machines, over network shares, etc. Just not using Internet Explorer from the specified URL, though opening other zip files from other URL’s worked fine.

Both problems have some documentation on Microsoft’s support website:

* http://support.microsoft.com/?kbid=816868
* http://support.microsoft.com/?kbid=308090

Neither of these items present a solution that is satisfactory, as they require the user to make changes to their machine, either by installing an Internet Explorer Service Pack, or changing file options in Windows.

Some investigation revealed that the problematic files all resided on websites being hosted from our development server, which is running Windows 2003 Server. Putting the zip file on a Linux or Windows 2000 Server box allowed Internet Explorer to download it without any problems.

It all came down to how IIS6 deals with mime types it doesn’t know about. To tighten up security, Microsoft has designed IIS6 to not serve files of unknown mime types. Although Windows 2003 Server has built-in support for compressed files, and in this case, Winzip was also installed on the server, which registered the zip extension and mime type, IIS was still refusing to serve zip files.

The workaround involved going into IIS and manually adding the zip extension and its mime type, so that IIS recognises it, and hence, serves it to visitors. To do this, you need to follow these steps:

* Open up IIS
* Right click on the website, then Properties
* Click on the HTTP Headers tab
* Click on the Mime Types button at the bottom
* Click New
* In the extension box, enter .ZIP, and in MIME type: application/x-zip-compressed
* Press OK, OK, OK

Changes take effect immediately; you do not need to restart IIS. Voila, users can now download zip files.

Update: some further investigation has revealed that the above doesn’t always solve the problem, but it’s still worth trying anyway. The exact cause of this remains unknown. Another reason to use Firefox perhaps?