在Windows Server 2008 R2 + IIS7:.mp4文件不能播放 [英] Windows Server 2008 r2 + IIS7: .mp4 files can not be played

查看:4460
本文介绍了在Windows Server 2008 R2 + IIS7:.mp4文件不能播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有web应用程序的怪trouble.Folder在我的服务器(IIS7.5,在Windows Server 2008 R2)。 Web应用程序具有视频播放。

I have the strange trouble.Folder of web application in my server (IIS7.5, Windows Server 2008 R2). Web application has Video player.

 <asp:Repeater ID="Repeater1" runat="server">
                        <ItemTemplate>
                      <video src='<%# ResolveUrl(GetVideoHandler(Eval("id"))) %>' width="900" height="400" controls="" preload=""></video>
                        </ItemTemplate>
                    </asp:Repeater>

它可以播放的MP4在我的本地系统,但是当我访问其他system.i的视频在 RESOLVEURL(GetVideoHandler(EVAL一个值gettong(它不活的服务器上玩ID))) VideoFolder / VideoName.mp4 播放视频。它正在开发过程中我loaclHost正常,但当林对其进行访问其它计算机上的网页链接不工作。有任何人的想法?谢谢你。

It can play .mp4 on my local System, but it don't play on live server when i accessing a video on other system.i have a Value gettong in ResolveUrl(GetVideoHandler(Eval("id"))) VideoFolder/VideoName.mp4 for playing video. Its working fine on my loaclHost during developing but don't working when Im accessing it web link on other computer. Have anybody idea? Thanks.

推荐答案

添加(下MIME类型或IIS)MIME类型服务器或Web应用程序的web.config。

Add the mime type to the server or web application web.config, (or in IIS under mime types).

 <system.webServer>
    <staticContent>
        <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
 </staticContent>

这篇关于在Windows Server 2008 R2 + IIS7:.mp4文件不能播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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