Error: You can not duplicate mimeMap collection item with unique key attribute in ASP.Net

Last Reply one year ago By abhi619

Posted one year ago

I have a website which I am trying to host locally on Window 10 where CSS and JS not working and it is throwing 500: internal server error to load css and js files. 
I have tried it on another server with different IIS version and it is working fine without any issue. but not working for IIS 10.

Solution I tried:
>> I have already tried setting Static Content in IIS config

>> I have tried permission set on files.
but nothing is working.

Please help

Posted one year ago

Hi abhi619,

Add below code in your web.config file

    <remove fileExtension=".ogg" />
    <mimeMap fileExtension = ".ogg" mimeType = "audio / ogg" />