【发布时间】:2012-09-05 15:56:29
【问题描述】:
我正在尝试访问我创建的使用 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,当我通过提琴手查看它时,我可以看到 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 应用程序似乎正在请求并接收该文件,它仍然会抛出错误消息,它需要允许跨域访问.. 有什么想法吗??
提前致谢。
【问题讨论】:
标签: c# wcf silverlight soap windows-services