MIME Mappings

If you're having trouble with static files, check the registered MIME types. By default, IIS will serve up only HTML and text files. If an unknown file type is requested, IIS sends the client a 404 error and, if available, logs a 404.3 error in the W3C Extended log file. If you encounter this issue, check the IIS log, and if you see the 404.3, add the MIME mapping to the list. Here's how:

  1. Open the IIS MMC by choosing Start | Administrative Tools | Internet Information Services (IIS) Manager.

  2. Right-click on the component (at the global, site, or directory level) that you wish to change the MIME types for, and choose Properties.

  3. Open the HTTP headers tab, and click the MIME Types button in the MIME Types section.

  4. Click New in the MIME Types window that pops up.

  5. In the MIME Type window, type the extension of the file you wish to add in the Extension text box.

  6. Type the MIME type in the text box provided.

  7. Click OK. You will then see that your extension has been added to the list of Registered MIME Types.

  8. Click OK again.

  9. Click OK one last time.

If you don't set up the MIME type properly, but the extension appears in the Registered MIME Types list, IIS will still serve up the file-it just won't know what to do with it. IE users will be prompted to choose a program to use to open this file.

Tip 

Don't know which MIME type is the correct one? They're all assigned and listed by the Internet Assigned Numbers Authority (IANA). Check them out at http://www.iana.org.




IIS 6(c) The Complete Reference
IIS 6: The Complete Reference
ISBN: 0072224959
EAN: 2147483647
Year: 2005
Pages: 193

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net