ClientAccessPolicy Sample

Recently I have delivered a 4-day training session on Silverlight 4 and many participants asked for a sample ClientAccessPolicy.xml file. So this is for those who want it :)


<?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>

Just change the “*” to “*.xyz.com” to restrict permissions to request originating from xyz.com


<domain uri="*"/>

Happy creating of WCF services for Silverlight & Flash..

Related posts:

Continue reading » · Written on: 01-21-10 · No Comments »

Leave a Reply