Reputation: 1163
I have been adding a video file named Video.m4v
to the root of my web site. when I type www.forexample.com/Video.m4v
it confront 404 error
While I expect a notification for starting to download this. what exactly should I do to make this happened? I want when I type www.forexample.com/Video.m4v
in browser it starts to download the video .
Appreciate any help. thank you
Upvotes: 1
Views: 354
Reputation: 4537
The documentation says:
IIS 7 will not return file types that are not added to the
<staticContent>
element or that have mappings in the<handlers>
element by default. This behavior prevents unauthorized access to files that do not have mappings in the IIS 7 configuration settings.
So, you need to define MIME-type for specified file extension in the application, site or server configuration using <mimeMap>
element. You could also use MIME Types feature of IIS Manager instead of editing configuration file directly.
To instruct browsers to download any static content use download
attribute for hyperlink.
Upvotes: 1