Cross-Domain Policies

One of the common issues with requesting feeds from a Silverlight 2 client application is that the web request is most often to a feed on another domain. The Silverlight client application must make a cross-domain web service request to obtain the feed data. Although this may seem obvious, many domains that host RSS and Atom feeds do not have a cross-domain policy file. Silverlight 2 cannot directly access and consume feeds hosted on another domain that does not have a cross-domain policy file that allows access to its web services.

The solution to obtaining a feed is to request the feed from a web service that does support a cross-domain call and that can request the feed directly. One such solution is to use a service such as FeedBurner. The examples in this chapter have requested the http://feeds.feedburner.com/johnpapa feed from the FeedBurner services. FeedBurner funnels syndicated feeds through its services and offers analysis of the feeds and other options.

One of the nice features of using a tool such as FeedBurner to publish syndication feeds is that the feeds.feedburner.com domain has a cross-domain policy file on its server root. The clientaccesspolicy.xml file exists at http://feeds.feedburner.com/crossdomain.xml and allows any client to make requests on its services. This makes requesting feeds from various sources much easier. If the feed was requested from http://johnpapa.net/feed/default.aspx (which is the feed for that website) from another domain, ...

Get Data-Driven Services with Silverlight 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.