I recently put a download of a CMD file on my website, but forgot to create the correct MIME type to allow it to be accessible. Without the correct MIME type, IIS 7.5 does not know how to handle the content of a specified extension and therefore will respond with a 404 error.
Use this procedure to create additional MIME Types.
- Logon to your server using an administrator account
- Run the IIS Manager via Start > All Programs > Administrative Tools > Internet Information Services (IIS) Manager
- Expand the Server Name node
- Expand the Sites node
- Locate the website that you wish to create the new MIME type under and select it.
- In the middle pane, locate the MIME Types object and double click on it.
- You will now see a list of all the MIME types your website knows about. Create the new MIME type by selecting Add from the Actions Pane on the right hand side.
- Fill out the File name extension field and the MIME type field. In this example I am adding a cmd extension so that I can make CMD files available for download from this site. The MIME type tells IIS what to do with the file – in this case it is a simple text file, therefore text/plain is the correct type. Once you have completed the fields, select OK to close the dialog box.
- The MIME type has now been added to the site and you can now download / handle correctly the new content type.