From: http://www.cnblogs.com/anncesky/articles/1776287.html
The first is to solve the problem of accessing Web Service Cross-origin access by SL.
Read the msdn and online materials, which are described in
Place a clientaccesspolicy. xml file in the root directory of the domain hosting the service to configure the service to allow cross-origin access.
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="SOAPAction">
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
Place a valid crossdomain. xml file in the root directory of the domain hosting the service. This file must mark the entire domain as public. Silverlight supports a subset of the crossdomain. xml architecture.
<?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="SOAPAction,Content-Type"/>
</cross-domain-policy>
However, I believe many friends still use Win XP as the development environment. Naturally, these two files will be placed in the same file as the web service. This will cause a system error.
The correct method is to place the two files in the directory mapped to the "default website" of IIS.