视频 (.mp4) 未在 MVC 中下载

Video (.mp4) not getting downloaded in MVC

在我看来,我有一个 link 可以下载如下的 .mp4

<a href="@Href("~/Content/mm/Manual_Video.mp4")" target="_blank"> Download Video </a>

我将 Manual_Video.mp4 存储在内容文件夹中,但是当我单击 link 时,出现以下错误

404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

有什么想法吗?

编辑

下载 PDF

这个 link 工作正常。

我四处查看并发现 this answer:

在 IIS 中添加扩展名为 mp4 的 MIME 类型

但请注意,您应该将 MIME 类型设置为 video/mp4 而不是 video/mpeg 否则在 IE 中 "Save Target As.." 显示不同的格式,并且它也会影响浏览器打开的默认视频播放器.

video/mpeg

File name: test.mpeg

Save as type: Movie Clip

video/mp4

File name: test.mp4

Save as type: MP4 Video