C# – play media file error in Silverlight


I am using Silverlight 2 + VSTS 2008 + C#. And I downloaded source code from the popular sl2videoplayer, http://sl2videoplayer.codeplex.com/ then I build the solution and then using IE to open default.html. But no video is played, here is the error message from IE and screen snapshot from IE. Any ideas what is wrong and analyze further?


Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; InfoPath.2; MS-RTC LM 8; .NET CLR 3.5.21022; .NET CLR 3.5.30729; CIBA; .NET CLR 3.0.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
Timestamp: Thu, 16 Jul 2009 10:20:02 UTC

Message: Unhandled Error in Silverlight 2 Application ClientBin/VideoPlayer.xap
Code: 4001    
Category: MediaError       
Message: AG_E_NETWORK_ERROR     

Line: 53
Char: 13
Code: 0
URI: file:///C:/software/sl2videoplayer/VideoPlayerWeb/default.html

Best Solution

Try putting the app directory on a web server and accessing it on the server. Local file playback doesn't always work that well.

Related Question