5

When i try to download iso file, it results in 404 page not found. The link in this instance is like:

http://www.domain.com/virtualDir/filename.iso

virtualDir points to a location on our file servers.

I don't want to read the binary array and then push it out as download since it is almost 600mb. I want the browser to handle this just like exes and zips.

What is the best way to handle this?

learning...
  • 3,104
  • 10
  • 58
  • 96
  • Is domain.com really your domain? – Ezra Nugroho Jul 30 '13 at 22:38
  • Did you add the MIME type to IIS or the web.config to allow IIS to serve this file type? – Steven V Jul 30 '13 at 22:38
  • @Steven V No i haven't added MIME type to IIS or web.config. I would like to add it to web.config rather than IIS since the same server has some other sites on it as well. Can you point me to some resource that i can look at for web.config setting? Thanks – learning... Jul 30 '13 at 22:49
  • @Steven V, i have found the following link for web.config. http://blogs.iis.net/bills/archive/2008/03/25/how-to-add-mime-types-with-iis7-web-config.aspx Please put your comment as an answer so that i can accept it. Thanks – learning... Jul 30 '13 at 23:00
  • Already created the answer, with the mime type you'd need to make it download. – Steven V Jul 30 '13 at 23:07

1 Answers1

10

I would imagine it is because IIS doesn't serve unknown file extensions. You need to add the MIME type to the overall IIS settings, or the web.config. As you asked for in the comment, I'd probably recommend placing it in the web.config since it doesn't require additional configuration from a sysadmin and everything is in one place.

<configuration>
    <system.webServer>
        <staticContent>
            <mimeMap fileExtension=".iso" mimeType="application/octet-stream" />
        </staticContent>
    </system.webServer>
</configuration> 
Steven V
  • 16,357
  • 3
  • 63
  • 76