All the registered IIS MIME types in IIS 7 + Windows Vista are registered in the following config file.

C:\Windows\System32\inetsrv\config\applicationHost.config

I was wondering where I can find the same file in Windows XP when I have IIS 6 installed?
Additionally, in Vista if I add a MIME type MANUALLY, it is included in a newly created [web.config] file in the corresponding directory. Where will be this particualr directory in XP?

Dani AI

Generated

As already pointed out, IIS6 (the XP-era IIS) keeps its static-file MIME registrations inside the IIS metabase (the XML-backed metabase used by IIS6). That metabase is the authoritative store for MimeMap entries created either from the MMC UI or by scripts — IIS6 does not create a per-folder web.config for native static MIME mappings the way IIS7+ does. (learn.microsoft.com)

To add or scope MIME types in IIS6 you use the IIS Manager (pick the server, site or a specific directory, open Properties → HTTP Headers → MIME Types and add the extension/type). If you need a folder-specific mapping you must make that folder a virtual directory/application (which creates its own metabase node), or handle it in managed code/handlers — there is no automatic web.config static-MIME behavior in IIS6. (learn.microsoft.com)

Quick programmatic workflow (safe, repeatable): use a small VBScript to enumerate or add MimeMap entries via the IIS ADSI interface. Example to list mappings (run with cscript):

dim mimeMapEntry, allMimeMaps
Set mimeMapEntry = GetObject("IIS://localhost/MimeMap")
allMimeMaps = mimeMapEntry.GetEx("MimeMap")
For Each mimeMap In allMimeMaps
  WScript.Echo mimeMap.MimeType & " (" & mimeMap.Extension & ")"
Next

This is the supported programmatic approach for IIS5/6 metabase MimeMap changes. (learn.microsoft.com)

Cautions and troubleshooting: always back up the metabase before bulk edits and avoid hand-editing the XML while IIS is running unless you understand the “direct metabase edit” option. IIS6 keeps automatic metabase history and has settings that control edit-while-running — use the built‑in backup/restore or admin scripts to recover if needed. (flylib.com)

Recommended Answers

All 2 Replies

c:\windows\system32\inetsrv\metabase.xml

c:\windows\system32\inetsrv\metabase.xml

Thanks netvance.

Note : apparently, unlike in IIS 7 every MIME entry written, irrespective of MANUAL/PROGRAMMATICAL ways to write them, is written on this file it seems.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.