I am trying to install letsencrypt certificate with Certify, but I get error, which (I think) has nothing to do with Certify. Problem is how my web.config is configured for
Put this in the .\.well-known\acme-challenge\Web.Config
file just next to the Lets Encrypt DNS verification file(s). No need to change the Web.Config
you already have. All it does it tell IIS to cough up files without extension in the directory where this Web.Config
resides with mime type text/plain
as Lets Encrypt expects that.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension="." mimeType="text/plain" />
</staticContent>
<handlers>
<clear />
<add name="StaticFile" path="*" verb="GET" modules="StaticFileModule" resourceType="Either" />
</handlers>
</system.webServer>
</configuration>
In my case, the problem was I forgot to remove App_Offline.htm while issuing the request. After removing it, the problem disappeared.
The problem I ran into with the default web.config in the acme-challenge folder was that the applicationhost.config contained:
<section name="handlers" overrideModeDefault="Deny" />
The handlers section in the acme-challenge web.config therefore was not allowed with the result that the challenge failed. In this case the solutions were: Change applicationhost.config line to:
<section name="handlers" overrideModeDefault="Allow" />
Or ... Remove the handlers setting from the web.config in acme-challenge folder.