IIS 8.5 Serve file with no extension from particular folder

iis-8.5static-files

I have some files that have been uploaded to a folder called /Download however the have no extension e.g. File1 I have tried adding a /Download/Web.Config file with the following specified

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <staticContent>
            <mimeMap fileExtension=".*" mimeType="application/octet-stream" />
        </staticContent>
    </system.webServer>
</configuration>

But with this in place I still receive this error from IIS:

HTTP Error 404.17 – Not Found The requested content appears to be
script and will not be served by the static file handler.

Most likely causes:
The request matched a wildcard mime map. The request is mapped to the
static file handler. If there were different pre-conditions, the
request will map to a different handler.

Things you can try: If you want to serve this content as a static
file, add an explicit MIME map.

Best Answer

Have you tried with just a dot?

<mimeMap fileExtension="." mimeType="application/octet-stream" />