Cross domain error in Silverlight?

I am trying to read a feed from Yahoo Pipes in a Silverlight application. I keep getting a SecurityException which sounds like a cross-power issue, but Yahoo pipes if you go through the pipe.yahooapis domain have cross-domain policy so it should be fine. I tried the same code but went to the Digg API and it works great (although this is more of a recreation than an RSS feed). Could my mistake have nothing to do with Cross Domain policies?

I am using the following code for a web request:

 WebClient wc = new WebClient();    
 wc.DownloadStringAsyncCompleted += new DownloadStringCompletedEventHandler(wc_DlStrCompleted);    
 wc.DownloadStringAsync(new Uri(yahooPipesUrl));

      

The exception I am getting is System.Security.SecurityException.

The url I am trying to do is

http://pipes.yahooapis.com/pipes/pipe.run?_id=4rBri9Ef3RG8CEGLLe2fWQ&_render=rss&feedUrl=http://feeds.feedburner.com/follesoe

+1


source to share


3 answers


In-Place Policy File:

<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> 
<cross-domain-policy> 
  <site-control permitted-cross-domain-policies="master-only" /> 
  <allow-access-from domain="*" /> 
</cross-domain-policy>

      



There is a current issue that Silverlight does not work with all Flash Cross Domain format files. I would expect the site control to break it.

+3


source


The crossdomain.xml policy file at http://pipes.yahooapis.com/crossdomain.xml specifies only secure (https :) requests in the allow-access-from element. See the documentation about the format here :



<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
  <site-control permitted-cross-domain-policies="master-only" />
  <allow-access-from domain="*" secure="true" />
</cross-domain-policy>

      

+1


source


The client access policy file is missing from http://pipes.yahoo.com/crossdomain.xml or http://pipes.yahoo.com/clientaccesspolicy.xml

Therefore, SecurityException is the correct behavior.

What is the exact URL you are trying to access?

0


source







All Articles