Skip to main content
Home Forums Silverlight Programming Programming with .NET - General asx file in silverlight radio playergiving 4001 error, while typing that file to ie url plays correctly it
3 replies. Latest Post by Jonathan Shen – MSFT on February 20, 2009.
(0)
skm.soft...
Member
196 points
216 Posts
02-16-2009 3:02 AM |
Hi
I have created a radio player in silverlight, wma file correctly working on this radio(i.e if we give the pathof wma file) but if I give the path of asx file, it gives 4001 error while typing that asx url in internet explorerwill play the audio correctly.Is anyone has the solution for this.
bryant
Star
9937 points
1,629 Posts
02-16-2009 3:07 AM |
Make sure you're not using an unsupported part of ASX and that your media files are the right encoding for Silverlight. From the SDK:
MediaElement also supports playlists in the form of Advanced Stream Redirector (ASX) files, also known as Windows Media metafiles. Although the file name extension does not matter, these files typically have the .asx, .wax, .wvx, .wmx, or .wpl extension. For more information about these file types, see Windows Media Metafiles. Note: The following features of ASX files are not supported in Silverlight. ASX feature Description PreviewMode Attribute This attribute is found on the root ASX object. It is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ATTRIBUTE. BannerBar Attribute This attribute is found on the root ASX object. It is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ATTRIBUTE. SkipIfRef This attribute is found on the root ENTRY object. It is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ATTRIBUTE. PARAM Element This is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ELEMENT. REPEAT Element This is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ELEMENT. EVENT Element This is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ELEMENT. STARTMARKER Element This is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ELEMENT. ENDMARKER Element This is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ELEMENT. Invalid content If a valid ASX tag has content that is not accepted (for example, a MOREINFO tag contains a REF tag), a MediaFailed error is raised. Fallback URLs If an ENTRY tag has multiple REF children, only the first one is read. Unlike WMP, Silverlight will not attempt to open additional REF URLs in case the first one fails, and a MediaFailed error is raised. For more information on ASX elements, see ASX Elements Reference.
MediaElement also supports playlists in the form of Advanced Stream Redirector (ASX) files, also known as Windows Media metafiles. Although the file name extension does not matter, these files typically have the .asx, .wax, .wvx, .wmx, or .wpl extension. For more information about these file types, see Windows Media Metafiles.
The following features of ASX files are not supported in Silverlight.
ASX feature
Description
PreviewMode Attribute
This attribute is found on the root ASX object. It is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ATTRIBUTE.
BannerBar Attribute
SkipIfRef
This attribute is found on the root ENTRY object. It is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ATTRIBUTE.
PARAM Element
This is not supported and will raise a MediaError with AG_E_ASX_UNSUPPORTED_ELEMENT.
REPEAT Element
EVENT Element
STARTMARKER Element
ENDMARKER Element
Invalid content
If a valid ASX tag has content that is not accepted (for example, a MOREINFO tag contains a REF tag), a MediaFailed error is raised.
Fallback URLs
If an ENTRY tag has multiple REF children, only the first one is read. Unlike WMP, Silverlight will not attempt to open additional REF URLs in case the first one fails, and a MediaFailed error is raised.
For more information on ASX elements, see ASX Elements Reference.
02-16-2009 5:09 AM |
Thanks for reply,
In my appication , asx file contains only the path of wma file and nothing else like
mms://sitepath/wma_file_path.wma
asx file contains only the above line and not anything.
Can you please specify which changes are reqired.
Jonathan...
All-Star
24939 points
2,425 Posts
02-20-2009 12:44 AM |
Hi Skm,
skm.software@yahoo.com:In my appication , asx file contains only the path of wma file and nothing else like mms://sitepath/wma_file_path.wma
Please make sure your asx file has the correct format.
For example,
<ASX VERSION="3.0" > <ENTRY href="http://sample.microsoft.com/sample1.ASX" /> //absolute url is preferred</ASX>
To create the asx file, please reference to this article.Some of the properties, listed on bryant's reply are not supported. MMS protocol is not supported and will fall back to http.
The following Web protocols/schemes are supported:
http
https
mms (You can use an mms URL, but it will fall back to http.)
rtsp (You can use an rtsp URL, but it will fall back to http.)
rtspt (You can use an rtspt URL, but it will fall back to http.)
Best regards,
Jonathan