Welcome to WebmasterWorld Guest from 54.160.131.144

Forum Moderators: ocean10000

Message Too Old, No Replies

Allowing mp4 downloads from Windows server

Error 404 when file is on server

     

kiwibrit

11:09 am on May 25, 2010 (gmt 0)

10+ Year Member



I have a mp4 file which I would like page visitors to be able to download.

To do this the following code;

<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/videos/stopMotion.mp4">1.8MB Quick Time file</asp:HyperLink>


results in the follwing html

<a id="ctl00_ContentPlaceHolder1_HyperLink2" href="videos/stopMotion.mp4">1.8MB Quick Time file</a>


Clicking the link results in a 404 error.

I do not get the same problem for a .wmv file - so I suspect this is a Windows IIS configuration matter. What should I ask my web host to do?

kiwibrit

3:04 pm on May 25, 2010 (gmt 0)

10+ Year Member



Solved by amending web.config file

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

Featured Threads

Hot Threads This Week

Hot Threads This Month