IIS 7.5 Error Caused by Adding mimeMap to DNN Site (Duplicate Entry for the same mimeType)Posted: April 5, 2012
When you add mimeMap type to IIS site, there is an entry to be added to the applicationHost.config (You can see this file with Notepad from Win 2008 view All Files:
(For example, we are adding .mp4 type)
<mimeMap fileExtension=”.mp4″ mimeType=”video/mp4″ />
When you add mimeMap type to your Web application directly, IIS will add one entry to the web.config file.
If you add the same mimMap fileExtention to the site and your web application, you may run into problem you may not see it before.
When we find out the issue, the cure is to comment out the entry from web.config file. I have seen a better solution to use the [remove] syntax in web.config file to fix the problem. ”Doing the remove before the add should be fine even when the .xyz mime map doesn’t exist at a higher level.”
<pre><staticContent> <remove fileExtension=".mp4" /> <mimeMap fileExtension=".mp4" mimeType="video/mp4" /> </staticContent></pre>