I have the strange trouble. There are .mp3 and .ogg files in the folder of web application in my server (IIS7.5, Windows Server 2008 R2). Web application has flash player. It can play .mp3 only, but it don't play .ogg-files. Same web application in other server works fine. Have anybody idea? Thanks.
Asked
Active
Viewed 7,052 times
1 Answers
6
Add the OGG MIME type in your web.config. Something like:
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".m4v" mimeType="video/m4v" />
<mimeMap fileExtension=".ogg" mimeType="audio/ogg" />
<mimeMap fileExtension=".oga" mimeType="audio/ogg" />
<mimeMap fileExtension=".ogv" mimeType="video/ogg" />
<mimeMap fileExtension=".webm" mimeType="video/webm"/>
</staticContent>
</system.webServer>
</configuration>
See:

crb
- 7,998
- 1
- 38
- 53
-
I want to ask a question regarding your config. `.ogg` can be audio or video, how would you write to support that? – Daniel Cheung Jun 25 '16 at 12:03