I am developing an ASP.NET MVC3 application with C # and Razor. I created a page where the user can play video files that are in the application directory tree.
When I tested the application locally, it worked correctly, when I deployed it to MS Server 2008 with IIS 7.5 , everything worked fine except for video streaming.
The page does not even display the player, and this allows me to think that the application cannot find the Javascript file needed to load the player. I tried all types of URL encodings, I set different types of permissions, but this did not solve the problem. I hereby send the code View :
@model System.String
@{
ViewBag.Title = "Play";
}
<h2>Playing Topic Video</h2>
<div id='player'>This div will be replaced by the JW Player.</div>
<script type='text/javascript' src='@Url.Content("/FLV Player/jwplayer.js")'></script>
<script type='text/javascript'>
var filepath = @Html.Raw(Json.Encode(Model));
jwplayer('player').setup({
'flashplayer':'@Url.Content("/FLV Player/player.swf")',
'width': '400',
'height': '300',
'file': filepath
});
</script>
- , . - ?