Unusual behavior for mp3 mimeMap in IIS 7

I found completely unexpected behavior when adding a mimeMap element for files with mp3 extensions. This works great:

<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 item related to MP3 files, everything goes to hell in the notorious basket. Neither my js, nor my css, nor my aspx files will be served, and I get a lot of these:

HTTP Error 500.19 - Internal Server Error The requested page is not available because the corresponding configuration data for the page is invalid.

Has anyone seen this behavior before or had any pointers? I am (explicitly) less than adept in IIS configuration.

+6
source share
1 answer

this may be because .. IIS already has mimetype configured for mp3. you add to mmmap.config for mp3, you will get a double entry. just do

<remove fileExtension=".mp3"/>

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

considers

Goutham ganesh v

+16
source

Source: https://habr.com/ru/post/916136/


All Articles