Media Failed: 4001 AG_E_NETWORK_ERROR

Mar 14, 2011 at 9:05 PM

Hi
I am running on XP SP3, VWD Express 2010, Silverlight version 4.0.50917.0

Created a "Silverlight Application" and added SMF Core, Plugins, Plugins.Progressive and Utilities dlls as references to the Silverlight project.  The Main.xaml is as follows

[...]
xmlns:SMFCore="clr-namespace:Microsoft.SilverlightMediaFramework.Core;assembly=Microsoft.SilverlightMediaFramework.Core"
xmlns:SMFMedia="clr-namespace:Microsoft.SilverlightMediaFramework.Core.Media;assembly=Microsoft.SilverlightMediaFramework.Core"
[...]
<Grid x:Name="LayoutRoot" Background="White">
        <SMFCore:SMFPlayer LogLevel="All" LoggingConsoleVisibility="Visible">
            <SMFCore:SMFPlayer.Playlist>
                <SMFMedia:PlaylistItem MediaSource="http://smf.vertigo.com/videos/wildlife.wmv"/>
            </SMFCore:SMFPlayer.Playlist>
        </SMFCore:SMFPlayer>
  </Grid>
</UserControl>


When I run it with ConsoleLogging turned on, I see the error message "Media Failed: 4001 AG_E_NETWORK_ERROR"
Doing google search showed some type of cross-domain issue.  Which I don't think is applicable here.  Here is the link that I am referring to http://forums.silverlight.net/forums/p/205029/481575.aspx#481575.

In any case, can someone help in figuring out the issue?

Thanks
rockmeister

Coordinator
Mar 14, 2011 at 9:16 PM
Edited Mar 14, 2011 at 9:24 PM

rockmeister, I just tried this from my machine and the video played fine and I didn't see the error in the logging screen.

However, I have one idea and one suggestion if that doesn't work:

If your Silverlight project is your startup project instead of your web project, you will see this problem. VS runs the app from the file: scheme when running the SL app by itself and that causes a cross domain failure when trying to access the web. Running it through a webpage (http://localhost:*) will cause it to run thru the http: scheme. This is not SMF related, this is just the way Silverlight works.

If this is not the issue, can you try running fiddler and see if there are any errors reported in there?

Tim Greenfield

Mar 14, 2011 at 9:35 PM

Dang...  cover my face and walk into the hall of shame:-)

I had not not set the Web project as the startup project.  I really wish the error message could be a little better for a newbie like me.  In fact it took me a while to figure out how to turn up logging in SMF to see the error message in the first place...
BTW, thanks a bunch for the quick response.
rockmeister