开发者

CrossDomain error

开发者 https://www.devze.com 2023-01-01 02:38 出处:网络
I have hosted my Silverlight application in IIS, now when I try to access the application I get the following error

I have hosted my Silverlight application in IIS, now when I try to access the application I get the following error

System.ServiceModel.CommunicationException: an error occured while trying to make request to URI This could be due to attempting to access a service in a cross-domain way without proper cross-domain policy in place, or policy that is unsuitable for SOAP services.....

开发者_如何学运维I have placed the cross-domain policy properly in wwwroot as well as in the virtual directory.

<?xml version="1.0"?>

<cross-domain-policy>
  <allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>


If you don't need to be Flash-compatible with the security policy, try using the Silverlight-specific clientaccesspolicy.xml and see if you get the same error. Check out Tim Heuer's blog post about troubleshooting file location errors if you still are having issues

<?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 include-subpaths="true" path="/" />
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>
0

精彩评论

暂无评论...
验证码 换一张
取 消