gpt4 book ai didi

silverlight - 跨域错误

转载 作者:行者123 更新时间:2023-12-01 05:44:59 25 4
gpt4 key购买 nike

我在 IIS 中托管了我的 Silverlight 应用程序,现在当我尝试访问该应用程序时出现以下错误

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.....



我已将跨域策略正确放置在 wwwroot 以及虚拟目录中。
<?xml version="1.0"?>

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

最佳答案

如果您不需要与安全策略与 Flash 兼容,请尝试使用 Silverlight 特定的 clientaccesspolicy.xml 并查看是否出现相同的错误。退房 Tim Heuer's blog post关于对文件位置错误进行故障排除(如果仍有问题)

<?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>

关于silverlight - 跨域错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2882522/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com