IIS返回404未找​​到.mp4文件 [英] IIS returns 404 not found for .mp4 files

查看:366
本文介绍了IIS返回404未找​​到.mp4文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用HMTL视频标签播放视频。在我的本地视频播放,但是当我发表。它是在ASP.NET的基础上不played.I已创建的项目。
我在本地使用这样的方法。

 的http://本地主机:41563 /文件/ Just.mp4

和我发表的网址给我一个错误是这样的:

  http://111.111.22.22:41563/files/Just.mp4


  

404 - 文件或目录未找到。
      您正在寻找可能已经删除该资源,更名或暂时不可用。


我怎样才能解决这个问题。


解决方案

检查您是否有IIS MIME类型MP4增加了对托管网站(或你有你的视频文件的目录)。

为赢Server 2012的是已经存在,但为Win Server 2008中它默认情况下不包括在内。

所以,如果你开发/上WinSer2012测试,然后部署在WinSer2008那么你可以有这个问题。

MP4的MIME设置如下:
   文件扩展名:.MP4
   MIME类型:视频/ MP4

I used hmtl video tag to play video . In my localhost video plays but when I published . It is not played.I have created project based on in ASP.NET. I locally use like this method.

http://localhost:41563/files/Just.mp4

and When I published the url give me an error like this:

  http://111.111.22.22:41563/files/Just.mp4

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

How can I solve this.

解决方案

Check if you have IIS MIME Type for mp4 added for hosted site (or for the directory where you have your video files).

For the Win Server 2012 is is already there but for Win Server 2008 it is not included by default.

So, if you developed/tested on WinSer2012 and then deployed on WinSer2008 then you can have this issue.

The mp4 MIME settings are: File name extension: .mp4 MIME type: video/mp4

这篇关于IIS返回404未找​​到.mp4文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆