Friday, 15 January 2010

Silverlight Cross-Domain Http Request Results Into Security Exception

That is because cross-domain http requests are restricted in Silverlight. One has to add a crossdomain.xml into web service provider root folder with the following lines.

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
 <allow-access-from domain="*" />
</cross-domain-policy>

For more info see Network Security Access Restrictions in Silverlight.

No comments:

Post a Comment