Silverlight Cross Domain Policy Files

When calling a cross-domain service, Silverlight will check for the existence of clientaccesspolicy.xml first. This is the format defined by Silverlight and provides a pretty flexible way to define who can access what services. If not found, it will then default to look for crossdomain.xml, which is the file format implemented for Adobe Flash. It is important to note that this file will also still work for most public web services.
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>
<allow-http-request-headers-from domain=”*” headers=”*”/>
</cross-domain-policy>

Either way, when you are done with the file, it needs to go in the ROOT of the domain.  This is important as it is not the application root, but the root web.  Even if your app is at domain.com/myapp, the policy file needs to be at domain.com/clientaccesspolicy.xml.

Anyhow, maybe these files will help you.

Looking for quality Silverlight Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , | Posted under 3rd Party Software, Programming/Coding, Web Deploy | RSS 2.0

Leave a Reply

Your email address will not be published. Required fields are marked *


3 − 2 =

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>