SilverLight3访问Wcf 时,定要加跨域文件(clientaccesspolicy.xml或者crossdomain.xml)
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>
注意:一定要用 http-request-headers="*" 这个,否则不会成功
crossdomain.xml
<?xml version="1.0" encoding="utf-8" ?>
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>