我正在尝试使用我创建的使用 HTTPS 的自托管 WCF 服务。我可以使用 WCFClientTest 工具和 Web 浏览器访问该服务,但是我的 silverlight 应用程序无法正常工作。我收到以下错误:
This could be due to 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.
我确实有clientaccesspolicy.xml,当我通过fiddler查看它时,我可以看到silverlight应用程序正常。xml 文件包含以下内容:
<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>
问题是,即使 silverlight 应用程序似乎正在请求并接收该文件,它仍然会抛出允许跨域访问所需的错误消息。有什么想法吗?
提前致谢。