title | author | description | ms.date | ms.assetid | msc.legacyurl | msc.type |
---|---|---|---|---|---|---|
Adding IE 9 MIME Types to IIS 7 |
rick-anderson |
The preview release of Microsoft Internet Explorer (IE) version 9 includes support for additional MIME Types for rich media applications. To support the addi... |
04/23/2010 |
58cade70-6cd2-48e2-9550-98b053e4fcae |
/learn/manage/managing-your-configuration-settings/adding-ie-9-mime-types-to-iis |
authoredcontent |
by Randall DuBois
The preview release of Microsoft Internet Explorer (IE) version 9 includes support for additional MIME Types for rich media applications. To support the additional MIME Types, the MIME types must be added to your IIS server.
The following additional MIME types are supported in IE 9:
File name extension | MIME type |
---|---|
.svg | image/svg+xml |
.xht | application/xhtml+xml |
.xhtml | application/xhtml+xml |
To add these MIME types to your IIS server, you can:
- Manually add them by using the IIS Manager. For more information, see Configuring MIME Types in IIS 7 and Above.
- Update your web.config file as discussed in Bill Staple's blog post How to add mime types with IIS7 Web.config.
- Use the script included in this article.
You can also use the script included in this article to add the MIME Types on versions of Windows including Windows 2000 and later. The script uses WMI, and will add the MIME types on either a local or remote server.
To add MIME types for IE 9 to your IIS server using the AddMimeTypes script:
-
Create a new script file using your authoring tool or a text editor.
-
Copy the contents of the script file from the following section.
-
Paste the contents of the script into your new script file.
-
Save the script file as AddMimeTypes.vbs.
-
At a Command Prompt, type the following command:
[!code-consoleMain]
Replace
[RemoteServerName]
> with the name of the remote computer you want to add the MIME types to.[!NOTE] If the folder in which the script file is saved is not included in your Path environment variable, you must specify the full path to the script in the command, or change directories to the folder before running the command.
-
Verify the MIME types were added either by using the IIS Manager.
[!code-vbMain]