We help IT Professionals succeed at work.

Setting Up Cross Domain Policy File

I set up a cross domain policy file on Silverlight in the same directory that I set up MainPage.xaml.  I am calling a WCF Service I wrote from Silverlight.  When I call the WCF service, I am getting the following error:
"An error occurred while trying to make a request to URI 'http://localhost:5669/Service1.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details."

Do I need to install the cross domain policy file on the Web Server?

My cross domain policy file looks as follows:
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>

Thanks,

Dan
Comment
Watch Question

Place cross domain file in folder where your WCF Service is.

Dan