IIS 500 Error when trying to access file without extension

DangerD 11 Reputation points
2021-10-08T09:23:20.54+00:00

Server returns 500 error whem i'm trying to access file without extension, if i'll rename it and add ".jpg" it works fine.
web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <directoryBrowse enabled="true" />
        <cors enabled="true" failUnlistedOrigins="true">
            <add origin="*" />
        </cors>
        <staticContent>
            <mimeMap fileExtension=".*" mimeType="application/octet-stream" />
        </staticContent>
    </system.webServer>
</configuration>
Internet Information Services
{count} votes

1 answer

Sort by: Most helpful
  1. cbron 26 Reputation points
    2021-10-12T22:26:38.057+00:00

    Change the file extension to just a dot. dot-star is looking for any file extension, not no file extension.

    0 comments No comments