IIS 8 and mime type errors

posted in: Uncategorized | 0

I loaded up an existing project the other day and running on IIS 8. I was getting some weird Internal Server Error for mime types ā€“ mp4 etc., so I checked all the usual things ā€“ that Iā€™d installed all the IIS features on my laptop and static content was ticked, and the mime type existed on IIS.

Turns out IIS8 handles most mime types by default now and the existing project was including them manually in the static content section e.g.

    <staticContent>
      <mimeMap fileExtension=".mp4" mimeType="video/mpeg" />
    </staticContent>

The solution ā€“ comment out those items in the web.config and it all magically works again.

 

Technorati Tags: ,