IIS 7.5 Error Caused by Adding mimeMap to DNN Site (Duplicate Entry for the same mimeType)

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:
c:\windows\system32\inetsvr\config\applicationhost.config ).
(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.
In our case, the site stops to load scripts (javascript and css) and all navigation and image path are screwed. It was a pretty hard to identify the issue due to unclear error message.

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.”

        <remove fileExtension=".mp4" />
      <mimeMap fileExtension=".mp4" mimeType="video/mp4" />



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s