3

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.

  • 3
    Have you tried with just a dot? <mimeMap fileExtension="." mimeType="application/octet-stream" /> – hot2use Sep 4 '15 at 9:07
  • I tried with jusr a * but not with just a dot... Ill test now! – bUKaneer Sep 4 '15 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 '15 at 9:10
  • Thank you for the feedback. Looking forward to the points :-) – hot2use Sep 9 '15 at 15:02
  • The points are yours my friend! – bUKaneer Sep 9 '15 at 15:08
4

Have you tried with just a dot?

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.