I have a Webform that contains the following HTML:
<body>
<form id="form1" runat="server">
<div>
<video style="width: 100%;" controls autoplay>
<source src="<%= this.MP4 %>" type="video/mp4">
<source src="<%= this.OGV %>" type="video/ogg">
<source src="<%= this.WEBM %>" type="video/webm">
Your browser does not support the video tag.
</video>
</div>
</form>
</body>
This page is opened in a fancybox window, and the according video file is given through a url parameter (video.aspx?video=filename
) with which the path to the file is built in the code behind.
When I try it locally with Visual Studio 2012, everything works fine. Also if I call the file through the URL directly like so for instance: http://localhost:52916/_video/filename.webm
it works as well.
Here is the code:
protected void Page_PreRender(object sender, EventArgs e)
{
MP4 += Request.QueryString["video"] + ".mp4";
OGV += Request.QueryString["video"] + ".ogv";
WEBM += Request.QueryString["video"] + ".webm";
}
But on the live server the videos can't be found (404), also if called directly and when I check the Chrome Console I can see that all the GET requests for the video files get cancelled.
And it doesn't make any difference whether the page is opened in the fancybox window or if I open it directly, it still doesn't work. I also tried it with the paths to the files already filled in instead of doing it prgrammatically.
I found several people that seemed to have the same kind of problem, but none of their solutions worked.