Http Error 500.19 - Internal Server Error - Duplicate FileExtesion

-2

I got following error while hosting Web API in IIS 10.0

Error Code : 0x800700b7 Config Error : Cannot add duplicate collection entry of type 'add' with unique key attribute 'FileExtension' set to '.idq'

Please tell me the solution

iis-10

2 Answers

0

I think the port number is used by another project. You can try with different port.

answered on Stack Overflow Apr 8, 2020 by Vinay Kumar
0

Adding the same mime types at the application level (which IIS will place into a web.config file) and the site level (which IIS will place into the applicationHost.config file) may cause a conflict.

One solution would be to simply remove one of the two conflicting mimeMap extensions from one of the config files. However, in some rare scenarios, the IIS administrator may need to not remove one of the two conflicting mime mappings. If both mine maps are needed, the way to get around the conflict is to make one simple addition to the web.config which will do a REMOVE immediately prior to doing an ADD.

So if your application installation adds the following line to the web.config. . . … And this line creates a conflict with the same mime map in the applicationhost.config file, all you have to do is add the following line ABOVE that line so that it will look like the following:

       <remove fileExtension=".xyz" />
       <mimeMap fileExtension=".xyz" mimeType="xml/text" />

Doing the removal before the add should be fine even when the .xyz mime map doesn't exist at a higher level.

you could also do it by using iis GUI.

1)open iis manager.

2)select your site or application.

3)double click mime type from the middle pane.

enter image description here

4)Remove the MIME Type entry ".idq".

enter image description here

answered on Stack Overflow Apr 9, 2020 by Jalpa Panchal

User contributions licensed under CC BY-SA 3.0