[GH-ISSUE #9] Web.config error: duplicate ‘mimeMap’ #8

Closed
opened 2026-02-26 21:31:05 +03:00 by kerem · 2 comments
Owner

Originally created by @lfurzewaddock on GitHub (Feb 10, 2018).
Original GitHub issue: https://github.com/ridercz/AutoACME/issues/9

Originally assigned to: @ridercz on GitHub.

To resolve the following IIS error;

Cannot add duplicate collection entry of type ‘mimeMap’ with unique key attribute ‘fileExtension’ set to ‘.’

I needed to add the following line to the generated web.config

<remove fileExtension="." />

Perhaps its worth adding this by default?

<configuration>
  <system.webServer>
    <staticContent>
      <!--
        ACME server requires that the verification file is served either without
        Content-Type header or with "text/json". This setting ensures that.
      -->
      <remove fileExtension="." />
      <mimeMap fileExtension="." mimeType="text/json" />
    </staticContent>
  </system.webServer>
</configuration>

Great work by the way and thanks for the clear step by step instructions!

Originally created by @lfurzewaddock on GitHub (Feb 10, 2018). Original GitHub issue: https://github.com/ridercz/AutoACME/issues/9 Originally assigned to: @ridercz on GitHub. To resolve the following IIS error; > Cannot add duplicate collection entry of type ‘mimeMap’ with unique key attribute ‘fileExtension’ set to ‘.’ I needed to add the following line to the generated web.config `<remove fileExtension="." `/> Perhaps its worth adding this by default? ``` <configuration> <system.webServer> <staticContent> <!-- ACME server requires that the verification file is served either without Content-Type header or with "text/json". This setting ensures that. --> <remove fileExtension="." /> <mimeMap fileExtension="." mimeType="text/json" /> </staticContent> </system.webServer> </configuration> ``` Great work by the way and thanks for the clear step by step instructions!
kerem closed this issue 2026-02-26 21:31:06 +03:00
Author
Owner

@ridercz commented on GitHub (Feb 10, 2018):

Good idea,

<!-- gh-comment-id:364673099 --> @ridercz commented on GitHub (Feb 10, 2018): Good idea,
Author
Owner

@ridercz commented on GitHub (Feb 10, 2018):

Fixed in 1.5.2

<!-- gh-comment-id:364675595 --> @ridercz commented on GitHub (Feb 10, 2018): Fixed in 1.5.2
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AutoACME#8
No description provided.