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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With