Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bizarre behavior for mp3 mimeMap in IIS 7

I have encountered a completely unexpected behavior when adding a mimeMap element for files with mp3 extensions. This works fine:

<system.webServer>
  <validation validateIntegratedModeConfiguration="false" />
  <modules runAllManagedModulesForAllRequests="true" />
  <staticContent>
    <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
    <mimeMap fileExtension=".ogv" mimeType="video/ogg" />
    <mimeMap fileExtension=".webm" mimeType="video/webm" />
    <mimeMap fileExtension=".ogg" mimeType="audio/ogg" />
    <!--      <mimeMap fileExtension=".mp3" mimeType="audio/mpeg" /> -->
  </staticContent>
</system.webServer>

But as soon as I uncomment the element pertaining to MP3 files, everything goes to hell in a proverbial handbasket. Neither my js nor my css nor my aspx files will be served, and I get lots of these:

HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.

Anyone seen this behavior before, or have any pointers? I am (clearly) less than adept in IIS configuration.

like image 464
Kevin Nielsen Avatar asked May 19 '12 00:05

Kevin Nielsen


1 Answers

this behavior might be because.. In IIS the mimetype for mp3 is already configured. you adding in web.config mimemap for mp3 will cause duplicate entry. just do

<remove fileExtension=".mp3"/>

<mimeMap fileExtension=".mp3" mimeType="audio/mpeg" />

regards

Goutham Ganesh V

like image 136
Goutham ܢܢ Avatar answered Nov 15 '22 09:11

Goutham ܢܢ