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:
- Log onto the Web Server and Open IIS 6.0
- Right click the Web Server Computer name
- Click Properties
- Make sure that the extension you want IIS to serve is not already in the list
- Click New
- Enter the Extension (ie: .zipx)
- In the MIME type box enter the type. The generic type is application/octet-stream
- Click Ok to apply the new settings
- Either wait for the worker process to restart or you will need to manually restart IIS.
To Manually Restart IIS:
- In IIS Right Click the Web Server Computer name
- Highlight All Tasks
- Click Restart IIS
- After a few seconds of waiting IIS will have restarted, and the Web server will now be serving your new MIME type correctly