Test media playback in silverlight3. The Code is as follows (created using blend 3 ):
<Mediaelement X: Name = "new" margin = "95,63, 105,79" Source = "assets/New. wmv" stretch = "fill"/>
A simple line of code with the following error message:
Line: 53
CHAR: 13
Code: 0
Error: unhandled error in Silverlight 3 Application clientbin/silverlightcontroltest. xap
Code: 4001
Category: mediaerror
Message: ag_e_network_error
URL: http: // localhost: 17021/
Solution:
After query by multiple parties, the solution is found:
1. The media address must be changed to a URL address:
Modify as follows:
<Mediaelement X: Name = "new" margin = ", 63," Source ="HTTP: /localhost: 17021/assets/New. wmv"Stretch =" fill "/>
2. Copy the media files (including folders) originally placed under the blend file to the test URL directory.
According to the information found on the Internet, this error occurs in previous versions of Silverlight. It is not clear because I was just reading Silverlight. I hope you will not make such mistakes any more.