IIS 6 Unknown MIME Type Causes Error 404

If you are attempting to serve various file types from your site and specific files give you a 404 error like this: HTTP Error 404 – File or directory not found then you should check your IIS version and the MIME types that it supports.

Specifically, if you are running IIS 6 then unknown MIME types will result in a 404 error message. Previous versions of IIS would globally allow any MIME type to be served, but tightened security with IIS 6 ended this trend.

You can manually update the MIME types supported by IIS. Microsoft suggests for security reasons to specifically state the types in your IIS configuration rather than globally allowing all MIME types.

There are various sources of information for the steps to do this, but I found the Microsoft Support site’s instructions to be the most useful along with these instructions about restarting IIS6. The steps outlined are similar when updating the MIME type settings in ISS 7.

I ended up using steps from both articles. In a nutshell, here are the steps I took that worked for me.

To Register an Unknown MIME Type:

  1. Log onto the Web Server and Open IIS 6.0
  2. Right click the Web Server Computer name
  3. Click Properties
  4. Make sure that the extension you want IIS to serve is not already in the list
  5. Click New
  6. Enter the Extension (ie: .zipx)
  7. In the MIME type box enter the type. The generic type is application/octet-stream
  8. Click Ok to apply the new settings
  9. Either wait for the worker process to restart or you will need to manually restart IIS.

To Manually Restart IIS:

  1. In IIS Right Click the Web Server Computer name
  2. Highlight All Tasks
  3. Click Restart IIS
  4. After a few seconds of waiting IIS will have restarted, and the Web server will now be serving your new MIME type correctly

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s