R – Still having issues with the cross domain policy in Silverlight 3.0

cross-domainsilverlight

So I'm using both xml files listed below with no luck. They both exist in the root of my IIS hosted web service on a different web server (behind the firewall). The web service is a simple POX like service that returns a JSON string.

Also I'm trying to get access to this service from a cassini run project on my local machine (to test it out). I can view the JSON from a browser but get a security error in silverlight when I try to do an HTTP GET using the same uri (4004 is the error code shown)

Anything simple that I missed here?

clientaccesspolicy.xml

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="*">
        <domain uri="*"/>
      </allow-from>
      <grant-to>
        <resource path="/" include-subpaths="true"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

crossdomain.xml

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.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>

Best Answer

Are you using a tool like fiddler to see what address the request for the cross domain policy file is pointed at? That's usually my first check; if the policy file isn't being found I'll know where it's supposed to be and if it is then I usually need to look elsewhere.

Your clientaccesspolicy.xml is identical to my reference one. Should be no problems there.

Related Topic