Windows Server 2008 r2 + IIS7: .mp4 files cannot be played

I have a strange problem. Contains a web application on my server (IIS7.5, Windows Server 2008 R2). The web application has a 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> 

It can play .mp4 on my local system, but it does not play on a live server when I access a video on another system. I have a gettong value in ResolveUrl(GetVideoHandler(Eval("id"))) VideoFolder/VideoName.mp4 to play the video. It works fine on my loaclHost during development, but does not work when Im accesses this web link on another computer. Any ideas? Thanks.

+1
source share
2 answers

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

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

this is a fairly simple answer: There is no mpeg-4 multiplexer in the Windows 2008 server, so you cannot see any mp4 on your computer with the default setting of your server.

you may notice that if you insert the mouse cursor on a video file on your computer, you can see basic information about the file, such as name and duration.

on your server, you may find that if you do the same in the mp4 media file, you will not be able to see this information ...

The answer to this question is to go to the server manager under administrative tools on your Windows 2008 r2 server from the Start menu.

from there you need to select the functions on the left. after that you need to add additional functions and select DESKTOP EXPERIENCE and install.

this is the main thing you need to do so that the machine can read mp4 information. after that you need to enter the mime type for your mp4 media files. install codecs.

+2
source

Source: https://habr.com/ru/post/916994/


All Articles