Welcome to WebmasterWorld Guest from 54.162.152.232

Forum Moderators: ocean10000

Message Too Old, No Replies

Allowing mp4 downloads from Windows server

Error 404 when file is on server

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

Full Member

10+ Year Member

joined:Oct 14, 2004
posts:319
votes: 0


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?
3:04 pm on May 25, 2010 (gmt 0)

Full Member

10+ Year Member

joined:Oct 14, 2004
posts:319
votes: 0


Solved by amending web.config file

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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members