5

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.

5
  • 5
    Have you tried with just a dot? <mimeMap fileExtension="." mimeType="application/octet-stream" />
    – John K. N.
    Sep 4, 2015 at 9:07
  • I tried with jusr a * but not with just a dot... Ill test now!
    – bUKaneer
    Sep 4, 2015 at 9:08
  • 1
    Yeah that worked - I knew it would be something silly - if you add that as an answer Ill mark it correct!
    – bUKaneer
    Sep 4, 2015 at 9:10
  • Thank you for the feedback. Looking forward to the points :-)
    – John K. N.
    Sep 9, 2015 at 15:02
  • The points are yours my friend!
    – bUKaneer
    Sep 9, 2015 at 15:08

1 Answer 1

7

Have you tried with just a dot?

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .