tags:

views:

54

answers:

2

I have an IIS site setup to allow browsing, in a certain subfolder I have some files with .zfo extension.

When I browse using IIS - I can see the file name - but when I click the file I get a 404 file not found exception, any ideas why IIS won't see this file?

+2  A: 

To serve .zfo-files do this:

  1. Open the IIS Microsoft Management Console (MMC), right-click computer name, and then click Properties.
  2. Click MIME Types.
  3. Click New.
  4. In the Extension box, type .zfo
  5. In the MIME Type box, type application/octet-stream
  6. Apply the new settings
  7. Recycle application pool.

If you want to serve all files regardless of the file name extension (for example, if you cannot predict all files that will be served), follow these steps to add a wildcard character mapping:

Note You should only add the wildcard mapping to the IIS MIME map as a temporary solution during troubleshooting. After you have determined that a missing MIME type is the cause of the issue, remove the wildcard mapping and add the specific mapping for the MIME type that you need to serve.

  1. Open the IIS Microsoft Management Console (MMC), right-click the local computer name, and then click Properties.
  2. Click MIME Types.
  3. Click New.
  4. In the Extension box, type an asterisk (*).
  5. In the MIME Type box, type application/octet-stream.
  6. Apply the new settings. Note that you must restart the World Wide Web Publishing Service or wait for the worker process to recycle for the changes to take effect.

Note In addition to making these changes at the global level in IIS, you can add necessary MIME types at lower levels in the metabase. When you do this, you can specify the sites or directories that are permitted to serve content with a specific file name extension instead of globally allowing all sites to serve that extension.

Espo
I know this solution works - but isn't there a way to instruct IIS to serve ANY file type - what if I had a directory containing various downloads with any extension (even custom ones) - would I need to add a mime type for every single file possibility?
JL
I Updated my answer to include the wildcard mapping
Espo
A: 

You will have to add the .zfo extension as a MIME type in IIS.

Try this TechNet article for the full detials.

Keith Bloom