Wednesday, June 20, 2012
Visual Studio & IIS Express : Add static content mime types like ".WebM"
Posted by Luke Baughan at 11:43 amI took over a project the other day which had cause to use video in WebM format. Cassini (bless it) flatly refused to do anything at all with the file and one of the requirements was to take some action after the video finished playing. Not wanting to code this "blind" I decided it was about time to upgrade to IIS Express (I already had Visual Studio sp1 installed but not from the Web Platform Installer). I went off and downloaded the executable and followed the following instructions to set it up.
IIS Express Download:
Installation and Setup Instructions:
WebM File Format Details (See naming section):
Once this was completed I simply had to navigate to the installation directory and run the following command and presto everything worked! My advice, drop Cassini and use IIS Express immediately!
C:\Program Files (x86)\IIS Express
Command to enabled WebM:
appcmd set config /section:staticContent /+[fileExtension='.webm',mimeType='video/webm']